From e35ab96c0b0b6eede086231a00ca303303661ae2 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 5 Feb 2019 18:00:48 -0800 Subject: [PATCH] Accepted baselines. --- .../forwardDeclaredCommonTypes01.errors.txt | 40 +++++++++++++++++++ .../reference/forwardDeclaredCommonTypes01.js | 28 +++++++++++++ .../forwardDeclaredCommonTypes01.symbols | 35 ++++++++++++++++ .../forwardDeclaredCommonTypes01.types | 40 +++++++++++++++++++ 4 files changed, 143 insertions(+) create mode 100644 tests/baselines/reference/forwardDeclaredCommonTypes01.errors.txt create mode 100644 tests/baselines/reference/forwardDeclaredCommonTypes01.js create mode 100644 tests/baselines/reference/forwardDeclaredCommonTypes01.symbols create mode 100644 tests/baselines/reference/forwardDeclaredCommonTypes01.types diff --git a/tests/baselines/reference/forwardDeclaredCommonTypes01.errors.txt b/tests/baselines/reference/forwardDeclaredCommonTypes01.errors.txt new file mode 100644 index 00000000000..59a3a7313aa --- /dev/null +++ b/tests/baselines/reference/forwardDeclaredCommonTypes01.errors.txt @@ -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 {} + interface Symbol {} + interface Map {} + interface WeakMap {} + interface Set {} + interface WeakSet {} + + (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. + }); + \ No newline at end of file diff --git a/tests/baselines/reference/forwardDeclaredCommonTypes01.js b/tests/baselines/reference/forwardDeclaredCommonTypes01.js new file mode 100644 index 00000000000..51778524430 --- /dev/null +++ b/tests/baselines/reference/forwardDeclaredCommonTypes01.js @@ -0,0 +1,28 @@ +//// [forwardDeclaredCommonTypes01.ts] +interface Promise {} +interface Symbol {} +interface Map {} +interface WeakMap {} +interface Set {} +interface WeakSet {} + +(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; +}); diff --git a/tests/baselines/reference/forwardDeclaredCommonTypes01.symbols b/tests/baselines/reference/forwardDeclaredCommonTypes01.symbols new file mode 100644 index 00000000000..427bf4c39fb --- /dev/null +++ b/tests/baselines/reference/forwardDeclaredCommonTypes01.symbols @@ -0,0 +1,35 @@ +=== tests/cases/compiler/forwardDeclaredCommonTypes01.ts === +interface Promise {} +>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 {} +>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 {} +>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 {} +>Set : Symbol(Set, Decl(forwardDeclaredCommonTypes01.ts, 3, 41)) +>T : Symbol(T, Decl(forwardDeclaredCommonTypes01.ts, 4, 14)) + +interface WeakSet {} +>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; +}); + diff --git a/tests/baselines/reference/forwardDeclaredCommonTypes01.types b/tests/baselines/reference/forwardDeclaredCommonTypes01.types new file mode 100644 index 00000000000..279b772d7d5 --- /dev/null +++ b/tests/baselines/reference/forwardDeclaredCommonTypes01.types @@ -0,0 +1,40 @@ +=== tests/cases/compiler/forwardDeclaredCommonTypes01.ts === +interface Promise {} +interface Symbol {} +interface Map {} +interface WeakMap {} +interface Set {} +interface WeakSet {} + +(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 + +}); +