TypeScript/tests/cases/compiler/jsExtendsImplicitAny.ts
Wesley Wigham 1045d95a44
Always instantiate the extends clause, even in the presence of an error (#20232)
* Still instantiate the extends clause even when theres a noimplicitany error in js

* Only be permissive for JS

* In JS, instantiate classes even when they have too many type arguments, instead of returning unknownType
2017-12-01 21:09:06 -05:00

19 lines
310 B
TypeScript

// @allowJs: true
// @checkJs: true
// @noEmit: true
// @noImplicitAny: true
// @Filename: /a.d.ts
declare class A<T> { x: T; }
// @Filename: /b.js
class B extends A {}
new B().x;
/** @augments A */
class C extends A { }
new C().x;
/** @augments A<number, number, number> */
class D extends A {}
new D().x;