diff --git a/tests/baselines/reference/NonNullableInNonStrictMode.js b/tests/baselines/reference/NonNullableInNonStrictMode.js deleted file mode 100644 index e5a577ed7ba..00000000000 --- a/tests/baselines/reference/NonNullableInNonStrictMode.js +++ /dev/null @@ -1,21 +0,0 @@ -//// [NonNullableInNonStrictMode.ts] -// These should all resolve to never - -type T0 = NonNullable; -type T1 = NonNullable; -type T2 = null & {}; -type T3 = undefined & {}; -type T4 = null & undefined; -type T6 = null & { a: string } & {}; - -// Repro from #50519 - -type NonNullableNew = T & {}; -type NonNullableOld = T extends null | undefined ? never : T; - -type IsNullWithoutStrictNullChecks = NonNullableNew; -type IsAlwaysNever = NonNullableOld; - - -//// [NonNullableInNonStrictMode.js] -// These should all resolve to never diff --git a/tests/baselines/reference/NonNullableInNonStrictMode.symbols b/tests/baselines/reference/NonNullableInNonStrictMode.symbols deleted file mode 100644 index b01bdc9cfbe..00000000000 --- a/tests/baselines/reference/NonNullableInNonStrictMode.symbols +++ /dev/null @@ -1,45 +0,0 @@ -=== tests/cases/compiler/NonNullableInNonStrictMode.ts === -// These should all resolve to never - -type T0 = NonNullable; ->T0 : Symbol(T0, Decl(NonNullableInNonStrictMode.ts, 0, 0)) ->NonNullable : Symbol(NonNullable, Decl(lib.es5.d.ts, --, --)) - -type T1 = NonNullable; ->T1 : Symbol(T1, Decl(NonNullableInNonStrictMode.ts, 2, 28)) ->NonNullable : Symbol(NonNullable, Decl(lib.es5.d.ts, --, --)) - -type T2 = null & {}; ->T2 : Symbol(T2, Decl(NonNullableInNonStrictMode.ts, 3, 33)) - -type T3 = undefined & {}; ->T3 : Symbol(T3, Decl(NonNullableInNonStrictMode.ts, 4, 20)) - -type T4 = null & undefined; ->T4 : Symbol(T4, Decl(NonNullableInNonStrictMode.ts, 5, 25)) - -type T6 = null & { a: string } & {}; ->T6 : Symbol(T6, Decl(NonNullableInNonStrictMode.ts, 6, 27)) ->a : Symbol(a, Decl(NonNullableInNonStrictMode.ts, 7, 18)) - -// Repro from #50519 - -type NonNullableNew = T & {}; ->NonNullableNew : Symbol(NonNullableNew, Decl(NonNullableInNonStrictMode.ts, 7, 36)) ->T : Symbol(T, Decl(NonNullableInNonStrictMode.ts, 11, 20)) ->T : Symbol(T, Decl(NonNullableInNonStrictMode.ts, 11, 20)) - -type NonNullableOld = T extends null | undefined ? never : T; ->NonNullableOld : Symbol(NonNullableOld, Decl(NonNullableInNonStrictMode.ts, 11, 32)) ->T : Symbol(T, Decl(NonNullableInNonStrictMode.ts, 12, 20)) ->T : Symbol(T, Decl(NonNullableInNonStrictMode.ts, 12, 20)) ->T : Symbol(T, Decl(NonNullableInNonStrictMode.ts, 12, 20)) - -type IsNullWithoutStrictNullChecks = NonNullableNew; ->IsNullWithoutStrictNullChecks : Symbol(IsNullWithoutStrictNullChecks, Decl(NonNullableInNonStrictMode.ts, 12, 64)) ->NonNullableNew : Symbol(NonNullableNew, Decl(NonNullableInNonStrictMode.ts, 7, 36)) - -type IsAlwaysNever = NonNullableOld; ->IsAlwaysNever : Symbol(IsAlwaysNever, Decl(NonNullableInNonStrictMode.ts, 14, 58)) ->NonNullableOld : Symbol(NonNullableOld, Decl(NonNullableInNonStrictMode.ts, 11, 32)) - diff --git a/tests/baselines/reference/NonNullableInNonStrictMode.types b/tests/baselines/reference/NonNullableInNonStrictMode.types deleted file mode 100644 index cb2894ce052..00000000000 --- a/tests/baselines/reference/NonNullableInNonStrictMode.types +++ /dev/null @@ -1,43 +0,0 @@ -=== tests/cases/compiler/NonNullableInNonStrictMode.ts === -// These should all resolve to never - -type T0 = NonNullable; ->T0 : never ->null : null - -type T1 = NonNullable; ->T1 : never - -type T2 = null & {}; ->T2 : never ->null : null - -type T3 = undefined & {}; ->T3 : never - -type T4 = null & undefined; ->T4 : never ->null : null - -type T6 = null & { a: string } & {}; ->T6 : never ->null : null ->a : string - -// Repro from #50519 - -type NonNullableNew = T & {}; ->NonNullableNew : NonNullableNew - -type NonNullableOld = T extends null | undefined ? never : T; ->NonNullableOld : NonNullableOld ->null : null - -type IsNullWithoutStrictNullChecks = NonNullableNew; ->IsNullWithoutStrictNullChecks : never ->null : null - -type IsAlwaysNever = NonNullableOld; ->IsAlwaysNever : never ->null : null - diff --git a/tests/baselines/reference/cancellationWhenfindingAllRefsOnDefinition.3.baseline.jsonc b/tests/baselines/reference/cancellationWhenfindingAllRefsOnDefinition.3.baseline.jsonc deleted file mode 100644 index fac647eb0ac..00000000000 --- a/tests/baselines/reference/cancellationWhenfindingAllRefsOnDefinition.3.baseline.jsonc +++ /dev/null @@ -1,116 +0,0 @@ -// === /tests/cases/fourslash/findAllRefsOnDefinition-import.ts === -// export class Test{ -// -// constructor(){ -// -// } -// -// public /*FIND ALL REFS*/[|start|](){ -// return this; -// } -// -// public stop(){ -// return this; -// } -// } - -// === /tests/cases/fourslash/findAllRefsOnDefinition.ts === -// import Second = require("./findAllRefsOnDefinition-import"); -// -// var second = new Second.Test() -// second.[|start|](); -// second.stop(); - -[ - { - "definition": { - "containerKind": "", - "containerName": "", - "fileName": "/tests/cases/fourslash/findAllRefsOnDefinition-import.ts", - "kind": "method", - "name": "(method) Test.start(): this", - "textSpan": { - "start": 58, - "length": 5 - }, - "displayParts": [ - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "method", - "kind": "text" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Test", - "kind": "className" - }, - { - "text": ".", - "kind": "punctuation" - }, - { - "text": "start", - "kind": "methodName" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "this", - "kind": "keyword" - } - ], - "contextSpan": { - "start": 51, - "length": 42 - } - }, - "references": [ - { - "textSpan": { - "start": 58, - "length": 5 - }, - "fileName": "/tests/cases/fourslash/findAllRefsOnDefinition-import.ts", - "contextSpan": { - "start": 51, - "length": 42 - }, - "isWriteAccess": true, - "isDefinition": true - }, - { - "textSpan": { - "start": 100, - "length": 5 - }, - "fileName": "/tests/cases/fourslash/findAllRefsOnDefinition.ts", - "isWriteAccess": false, - "isDefinition": false - } - ] - } -] \ No newline at end of file diff --git a/tests/baselines/reference/findReferencesAfterEdit.2.baseline.jsonc b/tests/baselines/reference/findReferencesAfterEdit.2.baseline.jsonc deleted file mode 100644 index c4ffdfb45bd..00000000000 --- a/tests/baselines/reference/findReferencesAfterEdit.2.baseline.jsonc +++ /dev/null @@ -1,195 +0,0 @@ -// === /tests/cases/fourslash/a.ts === -// interface A { -// /*FIND ALL REFS*/[|foo|]: string; -// } - -// === /tests/cases/fourslash/b.ts === -// /// -// -// -// function foo(x: A) { -// x.[|foo|] -// } - -[ - { - "definition": { - "containerKind": "", - "containerName": "", - "fileName": "/tests/cases/fourslash/a.ts", - "kind": "property", - "name": "(property) A.foo: string", - "textSpan": { - "start": 18, - "length": 3 - }, - "displayParts": [ - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "property", - "kind": "text" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "A", - "kind": "interfaceName" - }, - { - "text": ".", - "kind": "punctuation" - }, - { - "text": "foo", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "string", - "kind": "keyword" - } - ], - "contextSpan": { - "start": 18, - "length": 12 - } - }, - "references": [ - { - "textSpan": { - "start": 18, - "length": 3 - }, - "fileName": "/tests/cases/fourslash/a.ts", - "contextSpan": { - "start": 18, - "length": 12 - }, - "isWriteAccess": false, - "isDefinition": true - }, - { - "textSpan": { - "start": 57, - "length": 3 - }, - "fileName": "/tests/cases/fourslash/b.ts", - "isWriteAccess": false, - "isDefinition": false - } - ] - } -] - -// === /tests/cases/fourslash/a.ts === -// interface A { -// [|foo|]: string; -// } - -// === /tests/cases/fourslash/b.ts === -// /// -// -// -// function foo(x: A) { -// x./*FIND ALL REFS*/[|foo|] -// } - -[ - { - "definition": { - "containerKind": "", - "containerName": "", - "fileName": "/tests/cases/fourslash/a.ts", - "kind": "property", - "name": "(property) A.foo: string", - "textSpan": { - "start": 18, - "length": 3 - }, - "displayParts": [ - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "property", - "kind": "text" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "A", - "kind": "interfaceName" - }, - { - "text": ".", - "kind": "punctuation" - }, - { - "text": "foo", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "string", - "kind": "keyword" - } - ], - "contextSpan": { - "start": 18, - "length": 12 - } - }, - "references": [ - { - "textSpan": { - "start": 18, - "length": 3 - }, - "fileName": "/tests/cases/fourslash/a.ts", - "contextSpan": { - "start": 18, - "length": 12 - }, - "isWriteAccess": false - }, - { - "textSpan": { - "start": 57, - "length": 3 - }, - "fileName": "/tests/cases/fourslash/b.ts", - "isWriteAccess": false - } - ] - } -] \ No newline at end of file