Skip to content

[alpha.4-3] MdInput Tsc compile errors #518

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Pixcell opened this issue May 25, 2016 · 3 comments
Closed

[alpha.4-3] MdInput Tsc compile errors #518

Pixcell opened this issue May 25, 2016 · 3 comments

Comments

@Pixcell
Copy link

Pixcell commented May 25, 2016

Bug, feature request, or proposal:

Bug

What is the expected behavior?

All the *.d.ts files in @angular-material2 should pass tsc

What is the current behavior?

$ tsc && concurrently "npm start" "gulp"

node_modules/@angular2-material/input/input.d.ts(28,22): error TS2420: Class 'MdInput' incorrectly implements interface 'AfterContentInit'.
Property 'ngAfterContentInit' is missing in type 'MdInput'.
node_modules/@angular2-material/input/input.d.ts(28,22): error TS2420: Class 'MdInput' incorrectly implements interface 'OnChanges'.
Property 'ngOnChanges' is missing in type 'MdInput'.

npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dev"
npm ERR! node v5.11.1
npm ERR! npm v3.8.6
npm ERR! code ELIFECYCLE
npm ERR! [email protected] dev: tsc && concurrently "npm start" "gulp"
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] dev script 'tsc && concurrently "npm start" "gulp"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the Nestas package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! tsc && concurrently "npm start" "gulp"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs Nestas
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls Nestas
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/adewergifosse/Work/nestas/npm-debug.log

What are the steps to reproduce?

  1. upgrade to alpha.4-3:

├── @angular2-material/[email protected]
├── @angular2-material/[email protected]
├── @angular2-material/[email protected]
├── UNMET PEER DEPENDENCY @angular2-material/[email protected]
├── @angular2-material/[email protected]
├── @angular2-material/[email protected]
├── @angular2-material/[email protected]
├── @angular2-material/[email protected]
├── @angular2-material/[email protected]
├── @angular2-material/[email protected]
├── @angular2-material/[email protected]

  1. run tsc

Providing a Plunker (or similar) is the best way to get the team to see your issue.
Plunker template: http://plnkr.co/edit/o077B6uEiiIgkC0S06dd

What is the use-case or motivation for changing an existing behavior?

Which versions of Angular, Material, OS, browsers are affected?

angular2.rc1 / angular-material2.alpha.4-3

typings -v
1.0.4

tsc -v
Version 1.8.10

Is there anything else we should know?

I checked, and indeed the @angular-material2/input/input.d.ts has no definition of ngOnInit or ng OnChanges

I put "node_modules" in the exclude part of my typings.json, but since @angular-material2/input is required by my component, its still goes through tsc

As it is expected, according to:

"Any files that are referenced by those specified in the "files" property are also included. Similarly, if a file B.ts is referenced by another file A.ts, then B.ts cannot be excluded unless the referencing file A.ts is also specified in the "exclude" list." (microsoft/TypeScript#7432)

My temporary solution is to put those lines into the file node_modules/@angular2-material/input/input.d.ts in the declaration of MdInput

    //TSC FIX
    ngAfterContentInit(): void;
    ngOnChanges(value: any): void;
@davidgabrichidze
Copy link
Contributor

davidgabrichidze commented May 25, 2016

Same for me, implemented functions of interfaces, have /** @internal */ modifiers, and are not generated in d.ts files. Current branch also has same problem.

@Pixcell Pixcell changed the title [aplha.4-3] MdInput Tsc compile errors [alpha.4-3] MdInput Tsc compile errors May 25, 2016
@jelbourn
Copy link
Member

This should be resolved in the alpha.5 I just released. For the release, I removed the implements clause from each of the components (but it's still on master for development purposes).

andrewseguin pushed a commit to andrewseguin/components that referenced this issue Oct 15, 2018
Now only run tests on Chrome and Firefox
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants