diff --git a/tests/baselines/reference/undefinedEntityWithImmediateAndPrototypeAssignments.errors.txt b/tests/baselines/reference/undefinedEntityWithImmediateAndPrototypeAssignments.errors.txt new file mode 100644 index 00000000000..36594870861 --- /dev/null +++ b/tests/baselines/reference/undefinedEntityWithImmediateAndPrototypeAssignments.errors.txt @@ -0,0 +1,15 @@ +tests/cases/compiler/a.js(2,7): error TS2339: Property 'prototype' does not exist on type 'typeof Thing'. +tests/cases/compiler/a.js(3,5): error TS2351: This expression is not constructable. + Type 'typeof Thing' has no construct signatures. + + +==== tests/cases/compiler/a.js (2 errors) ==== + Thing.abc = 123 + Thing.prototype.def = 456 + ~~~~~~~~~ +!!! error TS2339: Property 'prototype' does not exist on type 'typeof Thing'. + new Thing(); + ~~~~~ +!!! error TS2351: This expression is not constructable. +!!! error TS2351: Type 'typeof Thing' has no construct signatures. + \ No newline at end of file diff --git a/tests/baselines/reference/undefinedEntityWithImmediateAndPrototypeAssignments.symbols b/tests/baselines/reference/undefinedEntityWithImmediateAndPrototypeAssignments.symbols new file mode 100644 index 00000000000..24c2f027153 --- /dev/null +++ b/tests/baselines/reference/undefinedEntityWithImmediateAndPrototypeAssignments.symbols @@ -0,0 +1,14 @@ +=== tests/cases/compiler/a.js === +Thing.abc = 123 +>Thing.abc : Symbol(Thing.abc, Decl(a.js, 0, 0)) +>Thing : Symbol(Thing, Decl(a.js, 0, 0)) +>abc : Symbol(Thing.abc, Decl(a.js, 0, 0)) + +Thing.prototype.def = 456 +>Thing.prototype : Symbol(Thing.def, Decl(a.js, 0, 15)) +>Thing : Symbol(Thing, Decl(a.js, 0, 0)) +>def : Symbol(Thing.def, Decl(a.js, 0, 15)) + +new Thing(); +>Thing : Symbol(Thing, Decl(a.js, 0, 0)) + diff --git a/tests/baselines/reference/undefinedEntityWithImmediateAndPrototypeAssignments.types b/tests/baselines/reference/undefinedEntityWithImmediateAndPrototypeAssignments.types new file mode 100644 index 00000000000..f7d86af40f6 --- /dev/null +++ b/tests/baselines/reference/undefinedEntityWithImmediateAndPrototypeAssignments.types @@ -0,0 +1,21 @@ +=== tests/cases/compiler/a.js === +Thing.abc = 123 +>Thing.abc = 123 : 123 +>Thing.abc : number +>Thing : typeof Thing +>abc : number +>123 : 123 + +Thing.prototype.def = 456 +>Thing.prototype.def = 456 : 456 +>Thing.prototype.def : any +>Thing.prototype : any +>Thing : typeof Thing +>prototype : any +>def : any +>456 : 456 + +new Thing(); +>new Thing() : any +>Thing : typeof Thing +