mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 02:33:53 -06:00
Accepting baselines
This commit is contained in:
parent
fa8355b331
commit
01e99828db
@ -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.
|
||||
|
||||
@ -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))
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user