Latest Material2 Types Incorrectly Implement 'CanDisable'
See original GitHub issueBug, feature request, or proposal:
Since upgrading material beta from 2.0.0-beta.3 to 2.0.0-beta.4, I’m getting multiple errors for button.d.ts, checkbox.d.ts, radio.d.ts, slide-toggle.d.ts, and slider.d.ts when building.
What is the expected behavior?
The application should build fine with no errors.
What is the current behavior?
When building, I’m getting errors similar to this:
/node_modules/@angular/material/typings/button/button.d.ts(40,22): error TS2420: Class 'MdButton' incorrectly implements interface 'CanDisable'.
Property 'disabled' is missing in type 'MdButton'.
/node_modules/@angular/material/typings/button/button.d.ts(40,39): error TS2507: Type '(new (...args: any[]) => CanDisable) & typeof MdButtonBase' is not a constructor function type.
These errors are the same for all 5 components mentioned at the top of this issue.
Which versions of Angular, Material, OS, browsers are affected?
Angular 4.0.2, Material 2.0.0-beta.4, Windows 7 & 10, Chrome
Is there anything else we should know?
I have made sure to remove the deprecated “forRoot()”, and I do not use HttpModule from MdIconModule, which are the only breaking changes listed in the changelog.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:6
- Comments:24 (5 by maintainers)
Top Results From Across the Web
Angular 4 with material - Stack Overflow
d.ts(40,22): error TS2420: Class 'MdButton' incorrectly implements interface 'CanDisable'. Property 'disabled' is private in type 'MdButton' but ...
Read more >Angular 4–Visual Studio 2017 - error TS2420
Angular 4–Visual Studio 2017 - error TS2420: Class 'MdButton' incorrectly implements interface 'CanDisable'. Property 'disabled' is missing in ...
Read more >angular/material2 - Gitter
Hi there! Ei, I'm having a lot of error like TS2420: Class 'MatNestedTreeNode<T>' incorrectly implements interface 'CanDisable'.
Read more >UNPKG - @angular/material
n *\n * Use of this source code is governed by an MIT-style license that can ... new SvgIconConfig(url);\n const /** @type {?}...
Read more >angular-in-action.pdf
Angular in Action is designed to help you learn how to use Angular in building your ... it the wrong type, the Metric...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Forgot to add this to the changelog: this now requires TypeScript 2.2
Any one who is getting this error and using visual studio IDE. Just update visual studio to version 15.2 and confirm you have Typescript version 2.2.0 in visual studio.