Error TS1110: Type expected
Note: for support questions, please use one of these channels: https://github.com/angular/material2/blob/master/CONTRIBUTING.md#question. This repository's issues are reserved for feature requests and bug reports.
- Do you want to request a feature or report a bug? Possible bug, but I am probably just missing something.
- What is the current behavior? Upon tsc -w I am getting: node_modules/@angular2-material/checkbox/checkbox.d.ts(22,12): error TS1110: Type expected. node_modules/@angular2-material/core/rtl/dir.d.ts(2,39): error TS1110: Type expected. node_modules/@angular2-material/sidenav/sidenav.d.ts(25,12): error TS1110: Type expected. node_modules/@angular2-material/sidenav/sidenav.d.ts(27,11): error TS1110: Type expected.
Everything still appears to work as expected, though.
- If the current behavior is a bug, please provide steps to reproduce and if possible a minimal demo of the problem via https://plnkr.co or similar.
N/A
- What is the expected behavior? Not seeing these messages (sorry).
- What is the motivation / use case for changing the behavior? N/A
- Which version of Angular and Material, and which browser and OS does this issue affect? Did this work in previous versions of Angular / Material? Please also test with the latest stable and snapshot versions.
"angular2": "2.0.0-beta.13", "@angular2-material/sidenav": "^2.0.0-alpha.2",
- Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix)
that is not a material2 issue.
tsc -w will compile all *.ts file in current directory by default, *.d.ts also match *.ts, so tsc will try to compile it.
of course, type define file can not be compile, so just tell tsc ignore node_modules folder.
you can do this by edit(or create) a file tsconfig.json and write these in:
{
"exclude" : [
"node_modules", "typings"
]
}
you should always ignore these two folder. otherwise tsc will scan entire node_modules recursively, that will very slow.
(more info about tsconfig, check https://basarat.gitbooks.io/typescript/content/docs/project/tsconfig.html)
btw how can you know to install material2 with "@angular2-material/xxxxxx" ? I never saw some package name like this before !
dose "@xxx/yyy" something special provided by npm? and where to know "xxxxxx" is "checkbox" not "check-box" or something else.
@GongT The @xxx/yyy means xxx is the organisation and yyy is the package name. You can see what name the material2 packages are using here https://www.npmjs.com/~angular2-material
See https://docs.npmjs.com/misc/scope
learned new thing :D
@GongT Thanks for the response. Seems like that would make sense, but my tsconfig.json already has:
"exclude": [ "node_modules", "typings/main", "typings/main.d.ts" ]
The stock set up from the 5 min quick start.
Update: Looks like updating Typescript from 1.7.3 to 1.8. This seems to respect the exclude property.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.