fix(router): throw when component in route config is not defined#3569
fix(router): throw when component in route config is not defined#3569btford wants to merge 1 commit intoangular:masterfrom
Conversation
There was a problem hiding this comment.
does ts2dart understand undefined literals?
There was a problem hiding this comment.
these tests are only for JS-land
e3688ca to
f57a55e
Compare
|
@IgorMinar I've amended with your changes– mind taking another look? |
There was a problem hiding this comment.
I'd like to add another assertion here with the wrong type (for ES5 users), but tsc won't even compile it. Is there a way to test ES5 code a user would write?
There was a problem hiding this comment.
it should compile it if you add <Type>(non-type), I think. well, maybe not :(
There was a problem hiding this comment.
http://stackoverflow.com/questions/14737518/is-there-a-way-to-ignore-type-incompatibility-in-typescript might explain how to do this --- hmmm, no, think this is still wrong.
There was a problem hiding this comment.
Nope: Neither type 'number' nor type 'Type' is assignable to the other. when I try to do something like <Type>4.
I'd be more comfortable adding this case in an un-processed route_config_impl.es5.js file, but I don't think this is easy to do with our current infrastructure.
There was a problem hiding this comment.
yeah. Maybe just leave a TODO() comment and leave it as-is, since it will only affect people writing non-typechecked code
There was a problem hiding this comment.
Aha! I can cast to any, then to Type: <Type>(<any>4)
f57a55e to
d5a9048
Compare
|
Hm, might have to move this logic outside the route definition classes into the recognizer or registry: https://travis-ci.org/angular/angular/jobs/74994261#L274 |
|
lgtm |
|
Merging PR #3569 on behalf of @IgorMinar to branch presubmit-IgorMinar-pr-3569. |
|
@btford the build failed. Could you look into it? |
|
On it already– I'm pushing a fix now. |
ae3a067 to
df578ec
Compare
df578ec to
48edf25
Compare
|
finally made all the compilers happy computers are the worst |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Close #3265