Skip to content

Commit 9b2769e

Browse files
committed
Baseline update for checker changes and new tests
1 parent 1beb385 commit 9b2769e

File tree

39 files changed

+1919
-46
lines changed

39 files changed

+1919
-46
lines changed

Diff for: tests/baselines/reference/accessorsOverrideProperty9.types

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ function ApiItemContainerMixin<TBaseClass extends IApiItemConstructor>(
9191
}
9292

9393
return MixedClass;
94-
>MixedClass : ((abstract new (...args: any[]) => MixedClass) & { prototype: ApiItemContainerMixin<any>.MixedClass; }) & TBaseClass
95-
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
94+
>MixedClass : ((abstract new (...args: any[]) => MixedClass) & { prototype: ApiItemContainerMixin<IApiItemConstructor>.MixedClass; }) & TBaseClass
95+
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9696
}
9797

9898
// Subclass inheriting from mixin

Diff for: tests/baselines/reference/aliasInstantiationExpressionGenericIntersectionNoCrash1.errors.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
aliasInstantiationExpressionGenericIntersectionNoCrash1.ts(10,1): error TS2352: Conversion of type '{ new (): ErrImpl<number>; prototype: ErrImpl<any>; } & (() => number)' to type '{ new (): ErrImpl<string>; prototype: ErrImpl<any>; } & (() => string)' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
2-
Type '{ new (): ErrImpl<number>; prototype: ErrImpl<any>; } & (() => number)' is not comparable to type '{ new (): ErrImpl<string>; prototype: ErrImpl<any>; }'.
1+
aliasInstantiationExpressionGenericIntersectionNoCrash1.ts(10,1): error TS2352: Conversion of type '{ new (): ErrImpl<number>; prototype: ErrImpl<unknown>; } & (() => number)' to type '{ new (): ErrImpl<string>; prototype: ErrImpl<unknown>; } & (() => string)' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
2+
Type '{ new (): ErrImpl<number>; prototype: ErrImpl<unknown>; } & (() => number)' is not comparable to type '{ new (): ErrImpl<string>; prototype: ErrImpl<unknown>; }'.
33
Type 'ErrImpl<number>' is not comparable to type 'ErrImpl<string>'.
44
Type 'number' is not comparable to type 'string'.
55

@@ -16,8 +16,8 @@ aliasInstantiationExpressionGenericIntersectionNoCrash1.ts(10,1): error TS2352:
1616
declare const e: ErrAlias<number>;
1717
e as ErrAlias<string>;
1818
~~~~~~~~~~~~~~~~~~~~~
19-
!!! error TS2352: Conversion of type '{ new (): ErrImpl<number>; prototype: ErrImpl<any>; } & (() => number)' to type '{ new (): ErrImpl<string>; prototype: ErrImpl<any>; } & (() => string)' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
20-
!!! error TS2352: Type '{ new (): ErrImpl<number>; prototype: ErrImpl<any>; } & (() => number)' is not comparable to type '{ new (): ErrImpl<string>; prototype: ErrImpl<any>; }'.
19+
!!! error TS2352: Conversion of type '{ new (): ErrImpl<number>; prototype: ErrImpl<unknown>; } & (() => number)' to type '{ new (): ErrImpl<string>; prototype: ErrImpl<unknown>; } & (() => string)' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
20+
!!! error TS2352: Type '{ new (): ErrImpl<number>; prototype: ErrImpl<unknown>; } & (() => number)' is not comparable to type '{ new (): ErrImpl<string>; prototype: ErrImpl<unknown>; }'.
2121
!!! error TS2352: Type 'ErrImpl<number>' is not comparable to type 'ErrImpl<string>'.
2222
!!! error TS2352: Type 'number' is not comparable to type 'string'.
2323

Diff for: tests/baselines/reference/aliasInstantiationExpressionGenericIntersectionNoCrash1.types

+8-8
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ declare const Err: typeof ErrImpl & (<T>() => T);
1717
> : ^^^^^^^^^^^^^^
1818

1919
type ErrAlias<U> = typeof Err<U>;
20-
>ErrAlias : { new (): ErrImpl<U>; prototype: ErrImpl<any>; } & (() => U)
21-
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20+
>ErrAlias : { new (): ErrImpl<U>; prototype: ErrImpl<unknown>; } & (() => U)
21+
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2222
>Err : typeof ErrImpl & (<T>() => T)
2323
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2424

2525
declare const e: ErrAlias<number>;
26-
>e : { new (): ErrImpl<number>; prototype: ErrImpl<any>; } & (() => number)
27-
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26+
>e : { new (): ErrImpl<number>; prototype: ErrImpl<unknown>; } & (() => number)
27+
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2828

2929
e as ErrAlias<string>;
30-
>e as ErrAlias<string> : { new (): ErrImpl<string>; prototype: ErrImpl<any>; } & (() => string)
31-
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
32-
>e : { new (): ErrImpl<number>; prototype: ErrImpl<any>; } & (() => number)
33-
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30+
>e as ErrAlias<string> : { new (): ErrImpl<string>; prototype: ErrImpl<unknown>; } & (() => string)
31+
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
32+
>e : { new (): ErrImpl<number>; prototype: ErrImpl<unknown>; } & (() => number)
33+
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3434

Diff for: tests/baselines/reference/aliasInstantiationExpressionGenericIntersectionNoCrash2.errors.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
aliasInstantiationExpressionGenericIntersectionNoCrash2.ts(15,1): error TS2352: Conversion of type 'Wat<number>' to type 'Wat<string>' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
2-
Type 'Wat<number>' is not comparable to type '{ new (): Class<string>; prototype: Class<any>; }'.
2+
Type 'Wat<number>' is not comparable to type '{ new (): Class<string>; prototype: Class<unknown>; }'.
33
Type 'Class<number>' is not comparable to type 'Class<string>'.
44
Type 'number' is not comparable to type 'string'.
55

@@ -22,7 +22,7 @@ aliasInstantiationExpressionGenericIntersectionNoCrash2.ts(15,1): error TS2352:
2222
wat as Wat<string>;
2323
~~~~~~~~~~~~~~~~~~
2424
!!! error TS2352: Conversion of type 'Wat<number>' to type 'Wat<string>' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
25-
!!! error TS2352: Type 'Wat<number>' is not comparable to type '{ new (): Class<string>; prototype: Class<any>; }'.
25+
!!! error TS2352: Type 'Wat<number>' is not comparable to type '{ new (): Class<string>; prototype: Class<unknown>; }'.
2626
!!! error TS2352: Type 'Class<number>' is not comparable to type 'Class<string>'.
2727
!!! error TS2352: Type 'number' is not comparable to type 'string'.
2828

Diff for: tests/baselines/reference/config/initTSConfig/Default initialized TSConfig/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
8787
// "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
8888
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
89+
// "strictInstanceOfTypeParameters": true, /* Default type arguments to parameter's constraint or 'unknown' instead of 'any' for instance checks. */
8990
// "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
9091
// "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
9192
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */

Diff for: tests/baselines/reference/config/initTSConfig/Initialized TSConfig with --help/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
8787
// "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
8888
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
89+
// "strictInstanceOfTypeParameters": true, /* Default type arguments to parameter's constraint or 'unknown' instead of 'any' for instance checks. */
8990
// "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
9091
// "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
9192
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */

Diff for: tests/baselines/reference/config/initTSConfig/Initialized TSConfig with --watch/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
8787
// "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
8888
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
89+
// "strictInstanceOfTypeParameters": true, /* Default type arguments to parameter's constraint or 'unknown' instead of 'any' for instance checks. */
8990
// "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
9091
// "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
9192
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */

Diff for: tests/baselines/reference/config/initTSConfig/Initialized TSConfig with advanced options/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
8787
// "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
8888
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
89+
// "strictInstanceOfTypeParameters": true, /* Default type arguments to parameter's constraint or 'unknown' instead of 'any' for instance checks. */
8990
// "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
9091
// "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
9192
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */

Diff for: tests/baselines/reference/config/initTSConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
8787
// "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
8888
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
89+
// "strictInstanceOfTypeParameters": true, /* Default type arguments to parameter's constraint or 'unknown' instead of 'any' for instance checks. */
8990
// "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
9091
// "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
9192
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */

Diff for: tests/baselines/reference/config/initTSConfig/Initialized TSConfig with enum value compiler options/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
8787
// "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
8888
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
89+
// "strictInstanceOfTypeParameters": true, /* Default type arguments to parameter's constraint or 'unknown' instead of 'any' for instance checks. */
8990
// "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
9091
// "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
9192
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */

Diff for: tests/baselines/reference/config/initTSConfig/Initialized TSConfig with files options/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
8787
// "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
8888
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
89+
// "strictInstanceOfTypeParameters": true, /* Default type arguments to parameter's constraint or 'unknown' instead of 'any' for instance checks. */
8990
// "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
9091
// "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
9192
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */

Diff for: tests/baselines/reference/config/initTSConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
8787
// "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
8888
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
89+
// "strictInstanceOfTypeParameters": true, /* Default type arguments to parameter's constraint or 'unknown' instead of 'any' for instance checks. */
8990
// "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
9091
// "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
9192
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */

Diff for: tests/baselines/reference/config/initTSConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
8787
// "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
8888
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
89+
// "strictInstanceOfTypeParameters": true, /* Default type arguments to parameter's constraint or 'unknown' instead of 'any' for instance checks. */
8990
// "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
9091
// "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
9192
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */

Diff for: tests/baselines/reference/config/initTSConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
8787
// "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
8888
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
89+
// "strictInstanceOfTypeParameters": true, /* Default type arguments to parameter's constraint or 'unknown' instead of 'any' for instance checks. */
8990
// "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
9091
// "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
9192
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */

Diff for: tests/baselines/reference/config/initTSConfig/Initialized TSConfig with list compiler options/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
8787
// "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
8888
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
89+
// "strictInstanceOfTypeParameters": true, /* Default type arguments to parameter's constraint or 'unknown' instead of 'any' for instance checks. */
8990
// "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
9091
// "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
9192
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */

Diff for: tests/baselines/reference/config/showConfig/Show TSConfig with compileOnSave and more/tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"strictBindCallApply": true,
1313
"strictPropertyInitialization": true,
1414
"alwaysStrict": true,
15-
"useUnknownInCatchVariables": true
15+
"useUnknownInCatchVariables": true,
16+
"strictInstanceOfTypeParameters": true
1617
},
1718
"references": [
1819
{

Diff for: tests/baselines/reference/config/showConfig/Shows tsconfig for single option/strict/tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"strictBindCallApply": true,
99
"strictPropertyInitialization": true,
1010
"alwaysStrict": true,
11-
"useUnknownInCatchVariables": true
11+
"useUnknownInCatchVariables": true,
12+
"strictInstanceOfTypeParameters": true
1213
}
1314
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"compilerOptions": {
3+
"strictInstanceOfTypeParameters": true
4+
}
5+
}

0 commit comments

Comments
 (0)