mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 02:33:53 -06:00
Update Baselines and/or Applied Lint Fixes
This commit is contained in:
parent
a188b81d8b
commit
ebda7c541e
@ -1,21 +0,0 @@
|
||||
//// [NonNullableInNonStrictMode.ts]
|
||||
// These should all resolve to never
|
||||
|
||||
type T0 = NonNullable<null>;
|
||||
type T1 = NonNullable<undefined>;
|
||||
type T2 = null & {};
|
||||
type T3 = undefined & {};
|
||||
type T4 = null & undefined;
|
||||
type T6 = null & { a: string } & {};
|
||||
|
||||
// Repro from #50519
|
||||
|
||||
type NonNullableNew<T> = T & {};
|
||||
type NonNullableOld<T> = T extends null | undefined ? never : T;
|
||||
|
||||
type IsNullWithoutStrictNullChecks = NonNullableNew<null>;
|
||||
type IsAlwaysNever = NonNullableOld<null>;
|
||||
|
||||
|
||||
//// [NonNullableInNonStrictMode.js]
|
||||
// These should all resolve to never
|
||||
@ -1,45 +0,0 @@
|
||||
=== tests/cases/compiler/NonNullableInNonStrictMode.ts ===
|
||||
// These should all resolve to never
|
||||
|
||||
type T0 = NonNullable<null>;
|
||||
>T0 : Symbol(T0, Decl(NonNullableInNonStrictMode.ts, 0, 0))
|
||||
>NonNullable : Symbol(NonNullable, Decl(lib.es5.d.ts, --, --))
|
||||
|
||||
type T1 = NonNullable<undefined>;
|
||||
>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> = 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> = 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<null>;
|
||||
>IsNullWithoutStrictNullChecks : Symbol(IsNullWithoutStrictNullChecks, Decl(NonNullableInNonStrictMode.ts, 12, 64))
|
||||
>NonNullableNew : Symbol(NonNullableNew, Decl(NonNullableInNonStrictMode.ts, 7, 36))
|
||||
|
||||
type IsAlwaysNever = NonNullableOld<null>;
|
||||
>IsAlwaysNever : Symbol(IsAlwaysNever, Decl(NonNullableInNonStrictMode.ts, 14, 58))
|
||||
>NonNullableOld : Symbol(NonNullableOld, Decl(NonNullableInNonStrictMode.ts, 11, 32))
|
||||
|
||||
@ -1,43 +0,0 @@
|
||||
=== tests/cases/compiler/NonNullableInNonStrictMode.ts ===
|
||||
// These should all resolve to never
|
||||
|
||||
type T0 = NonNullable<null>;
|
||||
>T0 : never
|
||||
>null : null
|
||||
|
||||
type T1 = NonNullable<undefined>;
|
||||
>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> = T & {};
|
||||
>NonNullableNew : NonNullableNew<T>
|
||||
|
||||
type NonNullableOld<T> = T extends null | undefined ? never : T;
|
||||
>NonNullableOld : NonNullableOld<T>
|
||||
>null : null
|
||||
|
||||
type IsNullWithoutStrictNullChecks = NonNullableNew<null>;
|
||||
>IsNullWithoutStrictNullChecks : never
|
||||
>null : null
|
||||
|
||||
type IsAlwaysNever = NonNullableOld<null>;
|
||||
>IsAlwaysNever : never
|
||||
>null : 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
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@ -1,195 +0,0 @@
|
||||
// === /tests/cases/fourslash/a.ts ===
|
||||
// interface A {
|
||||
// /*FIND ALL REFS*/[|foo|]: string;
|
||||
// }
|
||||
|
||||
// === /tests/cases/fourslash/b.ts ===
|
||||
// ///<reference path='a.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 ===
|
||||
// ///<reference path='a.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
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
Loading…
x
Reference in New Issue
Block a user