Previously variable declaration+function expression worked. Note that class expression/class declaration do not work, due to the way they are specified. I added a test for future reference.
12 lines
203 B
TypeScript
12 lines
203 B
TypeScript
// @noEmit: true
|
|
// @allowJs: true
|
|
// @checkJs: true
|
|
// @Filename: a.js
|
|
// mixed prototype-assignment+function declaration
|
|
function C() { this.p = 1; }
|
|
C.prototype = { q: 2 };
|
|
|
|
const c = new C()
|
|
c.p
|
|
c.q
|