Accepted baselines.

This commit is contained in:
Daniel Rosenwasser 2019-02-05 18:00:48 -08:00
parent 3382a2ea54
commit e35ab96c0b
4 changed files with 143 additions and 0 deletions

View File

@ -0,0 +1,40 @@
tests/cases/compiler/forwardDeclaredCommonTypes01.ts(9,9): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
tests/cases/compiler/forwardDeclaredCommonTypes01.ts(10,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
tests/cases/compiler/forwardDeclaredCommonTypes01.ts(10,17): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
tests/cases/compiler/forwardDeclaredCommonTypes01.ts(11,9): error TS2585: 'Map' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
tests/cases/compiler/forwardDeclaredCommonTypes01.ts(12,9): error TS2585: 'WeakMap' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
tests/cases/compiler/forwardDeclaredCommonTypes01.ts(13,9): error TS2585: 'Set' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
tests/cases/compiler/forwardDeclaredCommonTypes01.ts(14,9): error TS2585: 'WeakSet' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
==== tests/cases/compiler/forwardDeclaredCommonTypes01.ts (7 errors) ====
interface Promise<T> {}
interface Symbol {}
interface Map<K, V> {}
interface WeakMap<K extends object, V> {}
interface Set<T> {}
interface WeakSet<T extends object> {}
(function() {
new Promise;
~~~~~~~
!!! error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
new Symbol; Symbol();
~~~~~~
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
~~~~~~
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
new Map;
~~~
!!! error TS2585: 'Map' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
new WeakMap;
~~~~~~~
!!! error TS2585: 'WeakMap' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
new Set;
~~~
!!! error TS2585: 'Set' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
new WeakSet;
~~~~~~~
!!! error TS2585: 'WeakSet' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
});

View File

@ -0,0 +1,28 @@
//// [forwardDeclaredCommonTypes01.ts]
interface Promise<T> {}
interface Symbol {}
interface Map<K, V> {}
interface WeakMap<K extends object, V> {}
interface Set<T> {}
interface WeakSet<T extends object> {}
(function() {
new Promise;
new Symbol; Symbol();
new Map;
new WeakMap;
new Set;
new WeakSet;
});
//// [forwardDeclaredCommonTypes01.js]
(function () {
new Promise;
new Symbol;
Symbol();
new Map;
new WeakMap;
new Set;
new WeakSet;
});

View File

@ -0,0 +1,35 @@
=== tests/cases/compiler/forwardDeclaredCommonTypes01.ts ===
interface Promise<T> {}
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(forwardDeclaredCommonTypes01.ts, 0, 0))
>T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(forwardDeclaredCommonTypes01.ts, 0, 18))
interface Symbol {}
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(forwardDeclaredCommonTypes01.ts, 0, 23))
interface Map<K, V> {}
>Map : Symbol(Map, Decl(forwardDeclaredCommonTypes01.ts, 1, 19))
>K : Symbol(K, Decl(forwardDeclaredCommonTypes01.ts, 2, 14))
>V : Symbol(V, Decl(forwardDeclaredCommonTypes01.ts, 2, 16))
interface WeakMap<K extends object, V> {}
>WeakMap : Symbol(WeakMap, Decl(forwardDeclaredCommonTypes01.ts, 2, 22))
>K : Symbol(K, Decl(forwardDeclaredCommonTypes01.ts, 3, 18))
>V : Symbol(V, Decl(forwardDeclaredCommonTypes01.ts, 3, 35))
interface Set<T> {}
>Set : Symbol(Set, Decl(forwardDeclaredCommonTypes01.ts, 3, 41))
>T : Symbol(T, Decl(forwardDeclaredCommonTypes01.ts, 4, 14))
interface WeakSet<T extends object> {}
>WeakSet : Symbol(WeakSet, Decl(forwardDeclaredCommonTypes01.ts, 4, 19))
>T : Symbol(T, Decl(forwardDeclaredCommonTypes01.ts, 5, 18))
(function() {
new Promise;
new Symbol; Symbol();
new Map;
new WeakMap;
new Set;
new WeakSet;
});

View File

@ -0,0 +1,40 @@
=== tests/cases/compiler/forwardDeclaredCommonTypes01.ts ===
interface Promise<T> {}
interface Symbol {}
interface Map<K, V> {}
interface WeakMap<K extends object, V> {}
interface Set<T> {}
interface WeakSet<T extends object> {}
(function() {
>(function() { new Promise; new Symbol; Symbol(); new Map; new WeakMap; new Set; new WeakSet;}) : () => void
>function() { new Promise; new Symbol; Symbol(); new Map; new WeakMap; new Set; new WeakSet;} : () => void
new Promise;
>new Promise : any
>Promise : any
new Symbol; Symbol();
>new Symbol : any
>Symbol : any
>Symbol() : any
>Symbol : any
new Map;
>new Map : any
>Map : any
new WeakMap;
>new WeakMap : any
>WeakMap : any
new Set;
>new Set : any
>Set : any
new WeakSet;
>new WeakSet : any
>WeakSet : any
});