Skip to content

Commit 13269b3

Browse files
Accepted baselines.
1 parent eedc389 commit 13269b3

8 files changed

+152
-126
lines changed

tests/baselines/reference/api/tsserverlibrary.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2136,6 +2136,7 @@ declare namespace ts {
21362136
OmitParameterModifiers = 8192,
21372137
UseAliasDefinedOutsideCurrentScope = 16384,
21382138
UseSingleQuotesForStringLiteralType = 268435456,
2139+
PreserveVacuousIntersections = 536870912,
21392140
AllowThisInObjectLiteral = 32768,
21402141
AllowQualifedNameInPlaceOfIdentifier = 65536,
21412142
AllowAnonymousIdentifier = 131072,
@@ -2164,6 +2165,7 @@ declare namespace ts {
21642165
OmitParameterModifiers = 8192,
21652166
UseAliasDefinedOutsideCurrentScope = 16384,
21662167
UseSingleQuotesForStringLiteralType = 268435456,
2168+
PreserveVacuousIntersections = 536870912,
21672169
AllowUniqueESSymbolType = 1048576,
21682170
AddUndefined = 131072,
21692171
WriteArrowStyleSignature = 262144,
@@ -2172,7 +2174,7 @@ declare namespace ts {
21722174
InFirstTypeArgument = 4194304,
21732175
InTypeAlias = 8388608,
21742176
/** @deprecated */ WriteOwnNameForAnyLike = 0,
2175-
NodeBuilderFlagsMask = 277904747
2177+
NodeBuilderFlagsMask = 814775659
21762178
}
21772179
export enum SymbolFormatFlags {
21782180
None = 0,

tests/baselines/reference/api/typescript.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2136,6 +2136,7 @@ declare namespace ts {
21362136
OmitParameterModifiers = 8192,
21372137
UseAliasDefinedOutsideCurrentScope = 16384,
21382138
UseSingleQuotesForStringLiteralType = 268435456,
2139+
PreserveVacuousIntersections = 536870912,
21392140
AllowThisInObjectLiteral = 32768,
21402141
AllowQualifedNameInPlaceOfIdentifier = 65536,
21412142
AllowAnonymousIdentifier = 131072,
@@ -2164,6 +2165,7 @@ declare namespace ts {
21642165
OmitParameterModifiers = 8192,
21652166
UseAliasDefinedOutsideCurrentScope = 16384,
21662167
UseSingleQuotesForStringLiteralType = 268435456,
2168+
PreserveVacuousIntersections = 536870912,
21672169
AllowUniqueESSymbolType = 1048576,
21682170
AddUndefined = 131072,
21692171
WriteArrowStyleSignature = 262144,
@@ -2172,7 +2174,7 @@ declare namespace ts {
21722174
InFirstTypeArgument = 4194304,
21732175
InTypeAlias = 8388608,
21742176
/** @deprecated */ WriteOwnNameForAnyLike = 0,
2175-
NodeBuilderFlagsMask = 277904747
2177+
NodeBuilderFlagsMask = 814775659
21762178
}
21772179
export enum SymbolFormatFlags {
21782180
None = 0,

tests/baselines/reference/intersectionReduction.errors.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
tests/cases/conformance/types/intersection/intersectionReduction.ts(38,4): error TS2339: Property 'kind' does not exist on type 'never'.
2-
tests/cases/conformance/types/intersection/intersectionReduction.ts(80,1): error TS2322: Type 'any' is not assignable to type 'never'.
2+
The type 'never' was reduced from the intersection 'A & B'. Each type of that intersection has properties that conflict, so values of that type can never exist.
3+
tests/cases/conformance/types/intersection/intersectionReduction.ts(39,1): error TS2322: Type '42' is not assignable to type 'never'.
4+
The type 'never' was reduced from the intersection 'A & B'. Each type of that intersection has properties that conflict, so values of that type can never exist.
35
tests/cases/conformance/types/intersection/intersectionReduction.ts(81,1): error TS2322: Type 'any' is not assignable to type 'never'.
6+
tests/cases/conformance/types/intersection/intersectionReduction.ts(82,1): error TS2322: Type 'any' is not assignable to type 'never'.
47

58

6-
==== tests/cases/conformance/types/intersection/intersectionReduction.ts (3 errors) ====
9+
==== tests/cases/conformance/types/intersection/intersectionReduction.ts (4 errors) ====
710
declare const sym1: unique symbol;
811
declare const sym2: unique symbol;
912

@@ -44,6 +47,11 @@ tests/cases/conformance/types/intersection/intersectionReduction.ts(81,1): error
4447
ab.kind; // Error
4548
~~~~
4649
!!! error TS2339: Property 'kind' does not exist on type 'never'.
50+
!!! error TS2339: The type 'never' was reduced from the intersection 'A & B'. Each type of that intersection has properties that conflict, so values of that type can never exist.
51+
ab = 42;
52+
~~
53+
!!! error TS2322: Type '42' is not assignable to type 'never'.
54+
!!! error TS2322: The type 'never' was reduced from the intersection 'A & B'. Each type of that intersection has properties that conflict, so values of that type can never exist.
4755

4856
declare let x: A | (B & C); // A
4957
let a: A = x;

tests/baselines/reference/intersectionReduction.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ type C = { kind: 'c', foo: number };
3737

3838
declare let ab: A & B;
3939
ab.kind; // Error
40+
ab = 42;
4041

4142
declare let x: A | (B & C); // A
4243
let a: A = x;
@@ -111,6 +112,7 @@ const f4 = (t: number | (Container<"b"> & { dataB: boolean } & Container<"a">)):
111112

112113
//// [intersectionReduction.js]
113114
ab.kind; // Error
115+
ab = 42;
114116
var a = x;
115117
var r1 = f10(a1); // unknown
116118
var r2 = f10(a2); // string

0 commit comments

Comments
 (0)