Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Universal support #23

Merged
merged 6 commits into from
Jan 22, 2016
Merged

Universal support #23

merged 6 commits into from
Jan 22, 2016

Conversation

jeffbcross
Copy link
Contributor

No description provided.

@robwormald
Copy link
Contributor

out of the box I see some compilation errors:

/Users/robwormald/Dev/angular2/answers-app/node_modules/angular2-universal-preview/dist/server/server.d.ts(12,15): error TS2307: Cannot find module './src/render'.
/Users/robwormald/Dev/angular2/answers-app/node_modules/angular2-universal-preview/dist/server/src/http/server_http.d.ts(4,33): error TS2307: Cannot find module 'xhr2'.
/Users/robwormald/Dev/angular2/answers-app/node_modules/angular2-universal-preview/dist/server/src/platform/dom/server_dom_renderer.d.ts(6,22): error TS2415: Class 'ServerDomRootRenderer_' incorrectly extends base class 'DomRootRenderer'.
  Types have separate declarations of a private property '_registeredComponents'.
src/components/toast.ts(12,8): error TS2339: Property 'message' does not exist on type 'Toast'.
src/main-server.ts(2,26): error TS2307: Cannot find module 'express'.
src/services/Backend.ts(1,22): error TS2307: Cannot find module 'firebase'.

expected, or missing TSD stuff?

@robwormald
Copy link
Contributor

(all works fine, but i'll probably fail on CI unless we explicitly ignore those errors or handle them properly)

@jeffbcross
Copy link
Contributor Author

expected, or missing TSD stuff?

The universal errors should be fixed upstream. The errors about not finding express or firebase modules could be fixed by TSD. I will add a commit with TSD.

but i'll probably fail on CI

I just checked, and the gulp task still exits with 0 even with errors. Running tscdirectly would cause CI to fail.

@PatrickJS
Copy link
Member

I have typescript error fixes for
private property '_registeredComponents'. angular/angular#6584
Cannot find module './src/render'. angular/universal@f889e0f...master
Cannot find module 'xhr2'. pwnall/node-xhr2#20

@jeffbcross
Copy link
Contributor Author

@gdi2290 awesome! I was just looking at the universal repo and saw a lot of activity around TS issues, so I figured it was probably already fixed upstream.

@robwormald I added a PR with typings included, as well as some local fixes to make TS happy.

@PatrickJS
Copy link
Member

for the Cannot find module './src/render'. issue you need to do another npm install since I published it as a patch

@robwormald
Copy link
Contributor

LGTM

@@ -33,6 +37,7 @@
"systemjs": "^0.19.6",
"systemjs-builder": "^0.14.11",
"ts-node": "^0.5.4",
"tsd": "^0.6.5",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the repo should use typings. tsd will be deprecated soon. (you also want to .gitignore typings/ folder. see upgrade commit angular/universal-starter@cfb7b52)

@robwormald
Copy link
Contributor

merging this, lets deal with typings as a separate PR

robwormald added a commit that referenced this pull request Jan 22, 2016
feature(universal) add universal support
@robwormald robwormald merged commit 9b77859 into angular:master Jan 22, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants