question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Latest Material2 Types Incorrectly Implement 'CanDisable'

See original GitHub issue

Bug, 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:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:24 (5 by maintainers)

github_iconTop GitHub Comments

11reactions
jelbourncommented, May 12, 2017

Forgot to add this to the changelog: this now requires TypeScript 2.2

3reactions
YashGajeracommented, May 19, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found