Skip to content

Commit 340dae5

Browse files
committed
Accept new baselines
1 parent cd7f039 commit 340dae5

16 files changed

+36
-30
lines changed

tests/baselines/reference/ambientDeclarations.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ declare enum E3 {
118118
>E3 : E3
119119

120120
A
121-
>A : E3
121+
>A : E3.A
122122
}
123123
declare module E3 {
124124
>E3 : typeof E3

tests/baselines/reference/ambientEnum1.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
>E2 : E2
1313

1414
x = 'foo'.length
15-
>x : E2
15+
>x : E2.x
1616
>'foo'.length : number
1717
>'foo' : "foo"
1818
>length : number

tests/baselines/reference/ambientErrors.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ declare enum E2 {
5555
>E2 : E2
5656

5757
x = 'foo'.length
58-
>x : E2
58+
>x : E2.x
5959
>'foo'.length : number
6060
>'foo' : "foo"
6161
>length : number

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6659,7 +6659,8 @@ declare namespace ts {
66596659
TemplateLiteral = 134217728,
66606660
StringMapping = 268435456,
66616661
Literal = 2944,
6662-
Unit = 109440,
6662+
Unit = 109472,
6663+
Freshable = 2976,
66636664
StringOrNumberLiteral = 384,
66646665
PossiblyFalsy = 117724,
66656666
StringLike = 402653316,
@@ -6711,10 +6712,12 @@ declare namespace ts {
67116712
isClass(): this is InterfaceType;
67126713
isIndexType(): this is IndexType;
67136714
}
6714-
interface LiteralType extends Type {
6715+
interface FreshableType extends Type {
6716+
freshType: FreshableType;
6717+
regularType: FreshableType;
6718+
}
6719+
interface LiteralType extends FreshableType {
67156720
value: string | number | PseudoBigInt;
6716-
freshType: LiteralType;
6717-
regularType: LiteralType;
67186721
}
67196722
interface UniqueESSymbolType extends Type {
67206723
symbol: Symbol;
@@ -6729,7 +6732,7 @@ declare namespace ts {
67296732
interface BigIntLiteralType extends LiteralType {
67306733
value: PseudoBigInt;
67316734
}
6732-
interface EnumType extends Type {
6735+
interface EnumType extends FreshableType {
67336736
}
67346737
enum ObjectFlags {
67356738
None = 0,

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2684,7 +2684,8 @@ declare namespace ts {
26842684
TemplateLiteral = 134217728,
26852685
StringMapping = 268435456,
26862686
Literal = 2944,
2687-
Unit = 109440,
2687+
Unit = 109472,
2688+
Freshable = 2976,
26882689
StringOrNumberLiteral = 384,
26892690
PossiblyFalsy = 117724,
26902691
StringLike = 402653316,
@@ -2736,10 +2737,12 @@ declare namespace ts {
27362737
isClass(): this is InterfaceType;
27372738
isIndexType(): this is IndexType;
27382739
}
2739-
interface LiteralType extends Type {
2740+
interface FreshableType extends Type {
2741+
freshType: FreshableType;
2742+
regularType: FreshableType;
2743+
}
2744+
interface LiteralType extends FreshableType {
27402745
value: string | number | PseudoBigInt;
2741-
freshType: LiteralType;
2742-
regularType: LiteralType;
27432746
}
27442747
interface UniqueESSymbolType extends Type {
27452748
symbol: Symbol;
@@ -2754,7 +2757,7 @@ declare namespace ts {
27542757
interface BigIntLiteralType extends LiteralType {
27552758
value: PseudoBigInt;
27562759
}
2757-
interface EnumType extends Type {
2760+
interface EnumType extends FreshableType {
27582761
}
27592762
enum ObjectFlags {
27602763
None = 0,

tests/baselines/reference/declarationEmitForGlobalishSpecifierSymlink.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export enum A {
66
>A : A
77

88
Val
9-
>Val : A
9+
>Val : A.Val
1010
}
1111
=== /p1/node_modules/typescript-fsa/index.d.ts ===
1212

@@ -19,7 +19,7 @@ export enum A {
1919
>A : A
2020

2121
Val
22-
>Val : A
22+
>Val : A.Val
2323
}
2424
=== /p2/node_modules/typescript-fsa/index.d.ts ===
2525

tests/baselines/reference/declarationEmitForGlobalishSpecifierSymlink2.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export enum A {
66
>A : A
77

88
Val
9-
>Val : A
9+
>Val : A.Val
1010
}
1111
=== /cache/typescript-fsa/index.d.ts ===
1212

tests/baselines/reference/disallowLineTerminatorBeforeArrow.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ module m {
194194
>Enum : Enum
195195

196196
claw = (()
197-
>claw : Enum
197+
>claw : Enum.claw
198198
>(() => 10)() : number
199199
>(() => 10) : () => number
200200
>() => 10 : () => number

tests/baselines/reference/enumBasics.types

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ enum E7 {
140140
>E7 : E7
141141

142142
A = 'foo'['foo']
143-
>A : E7
143+
>A : E7.A
144144
>'foo'['foo'] : error
145145
>'foo' : "foo"
146146
>'foo' : "foo"
@@ -151,7 +151,7 @@ enum E8 {
151151
>E8 : E8
152152

153153
B = 'foo'['foo']
154-
>B : E8
154+
>B : E8.B
155155
>'foo'['foo'] : error
156156
>'foo' : "foo"
157157
>'foo' : "foo"
@@ -172,8 +172,8 @@ enum E9 {
172172
// (refer to .js to validate)
173173
// Enum constant members are propagated
174174
var doNotPropagate = [
175-
>doNotPropagate : (E8 | E7 | E4.Z | E3)[]
176-
>[ E8.B, E7.A, E4.Z, E3.X, E3.Y, E3.Z] : (E8 | E7 | E4.Z | E3)[]
175+
>doNotPropagate : (E8 | E7 | E4 | E3)[]
176+
>[ E8.B, E7.A, E4.Z, E3.X, E3.Y, E3.Z] : (E8 | E7 | E4 | E3)[]
177177

178178
E8.B, E7.A, E4.Z, E3.X, E3.Y, E3.Z
179179
>E8.B : E8

tests/baselines/reference/enumErrors.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ enum E5 {
1717
>E5 : E5
1818

1919
C = new Number(30)
20-
>C : E5
20+
>C : E5.C
2121
>new Number(30) : Number
2222
>Number : NumberConstructor
2323
>30 : 30

tests/baselines/reference/enumMerging.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ module M2 {
111111
}
112112

113113
var x = [EComp2.A, EComp2.B, EComp2.C, EComp2.D, EComp2.E, EComp2.F];
114-
>x : (EComp2.A | EComp2.B | EComp2.C | EComp2.D | EComp2.E | EComp2.F)[]
115-
>[EComp2.A, EComp2.B, EComp2.C, EComp2.D, EComp2.E, EComp2.F] : (EComp2.A | EComp2.B | EComp2.C | EComp2.D | EComp2.E | EComp2.F)[]
114+
>x : EComp2[]
115+
>[EComp2.A, EComp2.B, EComp2.C, EComp2.D, EComp2.E, EComp2.F] : EComp2[]
116116
>EComp2.A : EComp2.A
117117
>EComp2 : typeof EComp2
118118
>A : EComp2.A

tests/baselines/reference/enumWithExport.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ enum x {
1010
>x : x
1111

1212
z = y
13-
>z : x
13+
>z : x.z
1414
>y : any
1515
}

tests/baselines/reference/methodContainingLocalFunction.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ enum E {
105105
>E : E
106106

107107
A = (() => {
108-
>A : E
108+
>A : E.A
109109
>(() => { function localFunction() { } var x: { (): void; }; x = localFunction; return 0; })() : number
110110
>(() => { function localFunction() { } var x: { (): void; }; x = localFunction; return 0; }) : () => number
111111
>() => { function localFunction() { } var x: { (): void; }; x = localFunction; return 0; } : () => number

tests/baselines/reference/moduleLocalImportNotIncorrectlyRedirected.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ export declare enum Position {
1515
>Position : Position
1616

1717
top,
18-
>top : Position
18+
>top : Position.top
1919
}

tests/baselines/reference/numericEnumMappedType.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ enum N2 { C = val(), D = val() }
9191
>val : () => number
9292

9393
type T1 = { [K in N1 | N2]: K };
94-
>T1 : { [x: number]: N1.A | N1.B | N2.C | N2.D; }
94+
>T1 : { [x: number]: N1 | N2; }
9595

9696
// Enum types with string valued members are always literal enum types and therefore
9797
// ONE and TWO below are not computed members but rather just numerically valued members

tests/baselines/reference/this_inside-enum-should-not-be-allowed.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ enum TopLevelEnum {
33
>TopLevelEnum : TopLevelEnum
44

55
ThisWasAllowedButShouldNotBe = this // Should not be allowed
6-
>ThisWasAllowedButShouldNotBe : TopLevelEnum
6+
>ThisWasAllowedButShouldNotBe : TopLevelEnum.ThisWasAllowedButShouldNotBe
77
>this : any
88
}
99

@@ -14,7 +14,7 @@ module ModuleEnum {
1414
>EnumInModule : EnumInModule
1515

1616
WasADifferentError = this // this was handled as if this was in a module
17-
>WasADifferentError : EnumInModule
17+
>WasADifferentError : EnumInModule.WasADifferentError
1818
>this : any
1919
}
2020
}

0 commit comments

Comments
 (0)