Accepting baselines

This commit is contained in:
navya9singh 2023-02-07 00:16:41 +00:00
parent fa8355b331
commit 01e99828db
3 changed files with 50 additions and 0 deletions

View File

@ -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.

View File

@ -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))

View File

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