TypeScript/tests/cases/conformance/salsa/typeFromPropertyAssignment23.ts
Nathan Shively-Sanders 5c442419dc
Include arrow functions as javascript initializers (#23068)
This means that they are treated as valid js containers, methods, etc.
2018-04-02 10:11:39 -07:00

22 lines
357 B
TypeScript

// @noEmit: true
// @checkJs: true
// @allowJs: true
// @Filename: a.js
class B {
constructor () {
this.n = 1
}
foo() {
}
}
class C extends B { }
// this override should be fine (even if it's a little odd)
C.prototype.foo = function() {
}
class D extends B { }
D.prototype.foo = () => {
this.n = 'not checked, so no error'
}