diff --git a/internal/checker/grammarchecks.go b/internal/checker/grammarchecks.go index 7e1f23d508..c723edc3fc 100644 --- a/internal/checker/grammarchecks.go +++ b/internal/checker/grammarchecks.go @@ -1419,7 +1419,17 @@ func (c *Checker) checkGrammarTypeOperatorNode(node *ast.TypeOperatorNode) bool } func (c *Checker) checkGrammarForInvalidDynamicName(node *ast.DeclarationName, message *diagnostics.Message) bool { - if c.isNonBindableDynamicName(node) { + if !c.isNonBindableDynamicName(node) { + return false + } + var expression *ast.Node + if ast.IsElementAccessExpression(node) { + expression = ast.SkipParentheses(node.AsElementAccessExpression().ArgumentExpression) + } else { + expression = node.Expression() + } + + if !ast.IsEntityNameExpression(expression) { return c.grammarErrorOnNode(node, message) } diff --git a/testdata/baselines/reference/submodule/compiler/capturedParametersInInitializers2.errors.txt b/testdata/baselines/reference/submodule/compiler/capturedParametersInInitializers2.errors.txt index 7f7e502bfb..0576ba7b95 100644 --- a/testdata/baselines/reference/submodule/compiler/capturedParametersInInitializers2.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/capturedParametersInInitializers2.errors.txt @@ -1,11 +1,10 @@ capturedParametersInInitializers2.ts(3,20): error TS2373: Parameter 'y' cannot reference identifier 'x' declared after it. capturedParametersInInitializers2.ts(4,14): error TS2373: Parameter 'y' cannot reference identifier 'x' declared after it. capturedParametersInInitializers2.ts(6,10): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. -capturedParametersInInitializers2.ts(13,26): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. capturedParametersInInitializers2.ts(13,27): error TS2373: Parameter 'y' cannot reference identifier 'x' declared after it. -==== capturedParametersInInitializers2.ts (5 errors) ==== +==== capturedParametersInInitializers2.ts (4 errors) ==== function foo( y = class { static c = x; @@ -25,8 +24,6 @@ capturedParametersInInitializers2.ts(13,27): error TS2373: Parameter 'y' cannot y.c } function foo2(y = class {[x] = x}, x = 1) { - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~ !!! error TS2373: Parameter 'y' cannot reference identifier 'x' declared after it. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/capturedParametersInInitializers2.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/capturedParametersInInitializers2.errors.txt.diff deleted file mode 100644 index 159e922560..0000000000 --- a/testdata/baselines/reference/submodule/compiler/capturedParametersInInitializers2.errors.txt.diff +++ /dev/null @@ -1,24 +0,0 @@ ---- old.capturedParametersInInitializers2.errors.txt -+++ new.capturedParametersInInitializers2.errors.txt -@@= skipped -0, +0 lines =@@ - capturedParametersInInitializers2.ts(3,20): error TS2373: Parameter 'y' cannot reference identifier 'x' declared after it. - capturedParametersInInitializers2.ts(4,14): error TS2373: Parameter 'y' cannot reference identifier 'x' declared after it. - capturedParametersInInitializers2.ts(6,10): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. -+capturedParametersInInitializers2.ts(13,26): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - capturedParametersInInitializers2.ts(13,27): error TS2373: Parameter 'y' cannot reference identifier 'x' declared after it. - - --==== capturedParametersInInitializers2.ts (4 errors) ==== -+==== capturedParametersInInitializers2.ts (5 errors) ==== - function foo( - y = class { - static c = x; -@@= skipped -23, +24 lines =@@ - y.c - } - function foo2(y = class {[x] = x}, x = 1) { -+ ~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~ - !!! error TS2373: Parameter 'y' cannot reference identifier 'x' declared after it. - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/complicatedPrivacy.errors.txt b/testdata/baselines/reference/submodule/compiler/complicatedPrivacy.errors.txt index 4f493474e6..0131f5117a 100644 --- a/testdata/baselines/reference/submodule/compiler/complicatedPrivacy.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/complicatedPrivacy.errors.txt @@ -1,10 +1,9 @@ complicatedPrivacy.ts(11,24): error TS1054: A 'get' accessor cannot have parameters. -complicatedPrivacy.ts(35,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. complicatedPrivacy.ts(35,6): error TS2693: 'number' only refers to a type, but is being used as a value here. complicatedPrivacy.ts(73,55): error TS2694: Namespace 'mglo5' has no exported member 'i6'. -==== complicatedPrivacy.ts (4 errors) ==== +==== complicatedPrivacy.ts (3 errors) ==== module m1 { export module m2 { @@ -42,8 +41,6 @@ complicatedPrivacy.ts(73,55): error TS2694: Namespace 'mglo5' has no exported me export function f4(arg1: { [number]: C1; // Used to be indexer, now it is a computed property - ~~~~~~~~ -!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~ !!! error TS2693: 'number' only refers to a type, but is being used as a value here. }) { diff --git a/testdata/baselines/reference/submodule/compiler/complicatedPrivacy.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/complicatedPrivacy.errors.txt.diff deleted file mode 100644 index f9a416ec62..0000000000 --- a/testdata/baselines/reference/submodule/compiler/complicatedPrivacy.errors.txt.diff +++ /dev/null @@ -1,23 +0,0 @@ ---- old.complicatedPrivacy.errors.txt -+++ new.complicatedPrivacy.errors.txt -@@= skipped -0, +0 lines =@@ - complicatedPrivacy.ts(11,24): error TS1054: A 'get' accessor cannot have parameters. -+complicatedPrivacy.ts(35,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - complicatedPrivacy.ts(35,6): error TS2693: 'number' only refers to a type, but is being used as a value here. - complicatedPrivacy.ts(73,55): error TS2694: Namespace 'mglo5' has no exported member 'i6'. - - --==== complicatedPrivacy.ts (3 errors) ==== -+==== complicatedPrivacy.ts (4 errors) ==== - module m1 { - export module m2 { - -@@= skipped -40, +41 lines =@@ - export function f4(arg1: - { - [number]: C1; // Used to be indexer, now it is a computed property -+ ~~~~~~~~ -+!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~ - !!! error TS2693: 'number' only refers to a type, but is being used as a value here. - }) { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitComputedPropertyNameEnum2.errors.txt b/testdata/baselines/reference/submodule/compiler/declarationEmitComputedPropertyNameEnum2.errors.txt index bef0d0f635..e757df4afd 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitComputedPropertyNameEnum2.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitComputedPropertyNameEnum2.errors.txt @@ -1,11 +1,8 @@ -type.ts(1,28): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. type.ts(1,29): error TS2304: Cannot find name 'Enum'. -==== type.ts (2 errors) ==== +==== type.ts (1 errors) ==== export type Type = { x?: { [Enum.A]: 0 } }; - ~~~~~~~~ -!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~ !!! error TS2304: Cannot find name 'Enum'. diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitComputedPropertyNameEnum2.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitComputedPropertyNameEnum2.errors.txt.diff deleted file mode 100644 index e59bb3d51b..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitComputedPropertyNameEnum2.errors.txt.diff +++ /dev/null @@ -1,15 +0,0 @@ ---- old.declarationEmitComputedPropertyNameEnum2.errors.txt -+++ new.declarationEmitComputedPropertyNameEnum2.errors.txt -@@= skipped -0, +0 lines =@@ -+type.ts(1,28): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - type.ts(1,29): error TS2304: Cannot find name 'Enum'. - - --==== type.ts (1 errors) ==== -+==== type.ts (2 errors) ==== - export type Type = { x?: { [Enum.A]: 0 } }; -+ ~~~~~~~~ -+!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~ - !!! error TS2304: Cannot find name 'Enum'. - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitComputedPropertyNameEnum3.errors.txt b/testdata/baselines/reference/submodule/compiler/declarationEmitComputedPropertyNameEnum3.errors.txt index a960f11f4c..0762563c15 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitComputedPropertyNameEnum3.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitComputedPropertyNameEnum3.errors.txt @@ -1,8 +1,7 @@ -type.ts(7,28): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. type.ts(7,28): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -==== type.ts (2 errors) ==== +==== type.ts (1 errors) ==== export namespace Foo { export enum Enum { A = "a", @@ -11,8 +10,6 @@ type.ts(7,28): error TS2464: A computed property name must be of type 'string', } export type Type = { x?: { [Foo.Enum]: 0 } }; ~~~~~~~~~~ -!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ==== index.ts (0 errors) ==== diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitComputedPropertyNameEnum3.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitComputedPropertyNameEnum3.errors.txt.diff deleted file mode 100644 index 7c948e95d6..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitComputedPropertyNameEnum3.errors.txt.diff +++ /dev/null @@ -1,21 +0,0 @@ ---- old.declarationEmitComputedPropertyNameEnum3.errors.txt -+++ new.declarationEmitComputedPropertyNameEnum3.errors.txt -@@= skipped -0, +0 lines =@@ -+type.ts(7,28): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - type.ts(7,28): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - - --==== type.ts (1 errors) ==== -+==== type.ts (2 errors) ==== - export namespace Foo { - export enum Enum { - A = "a", -@@= skipped -8, +9 lines =@@ - } - } - export type Type = { x?: { [Foo.Enum]: 0 } }; -+ ~~~~~~~~~~ -+!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~~~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitMultipleComputedNamesSameDomain.errors.txt b/testdata/baselines/reference/submodule/compiler/declarationEmitMultipleComputedNamesSameDomain.errors.txt deleted file mode 100644 index 67a020a4b4..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitMultipleComputedNamesSameDomain.errors.txt +++ /dev/null @@ -1,13 +0,0 @@ -declarationEmitMultipleComputedNamesSameDomain.ts(5,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - - -==== declarationEmitMultipleComputedNamesSameDomain.ts (1 errors) ==== - declare const x: string; - declare const y: "y"; - - export class Test { - [x] = 10; - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - [y] = 10; - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitMultipleComputedNamesSameDomain.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitMultipleComputedNamesSameDomain.errors.txt.diff deleted file mode 100644 index c4ffb258f2..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitMultipleComputedNamesSameDomain.errors.txt.diff +++ /dev/null @@ -1,17 +0,0 @@ ---- old.declarationEmitMultipleComputedNamesSameDomain.errors.txt -+++ new.declarationEmitMultipleComputedNamesSameDomain.errors.txt -@@= skipped -0, +0 lines =@@ -- -+declarationEmitMultipleComputedNamesSameDomain.ts(5,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+ -+ -+==== declarationEmitMultipleComputedNamesSameDomain.ts (1 errors) ==== -+ declare const x: string; -+ declare const y: "y"; -+ -+ export class Test { -+ [x] = 10; -+ ~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+ [y] = 10; -+ } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/decoratorsOnComputedProperties.errors.txt b/testdata/baselines/reference/submodule/compiler/decoratorsOnComputedProperties.errors.txt index 9648cb6502..a035483e36 100644 --- a/testdata/baselines/reference/submodule/compiler/decoratorsOnComputedProperties.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/decoratorsOnComputedProperties.errors.txt @@ -1,9 +1,6 @@ decoratorsOnComputedProperties.ts(18,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(19,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(20,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(21,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(22,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(23,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(27,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(28,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(29,5): error TS1206: Decorators are not valid here. @@ -11,15 +8,11 @@ decoratorsOnComputedProperties.ts(30,5): error TS1206: Decorators are not valid decoratorsOnComputedProperties.ts(35,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(36,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(37,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(38,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(39,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(40,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(52,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(53,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(54,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(55,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(56,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(57,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(62,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(63,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(64,5): error TS1206: Decorators are not valid here. @@ -27,15 +20,11 @@ decoratorsOnComputedProperties.ts(65,5): error TS1206: Decorators are not valid decoratorsOnComputedProperties.ts(70,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(71,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(72,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(73,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(74,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(75,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(88,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(89,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(90,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(92,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(93,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(94,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(98,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(99,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(100,5): error TS1206: Decorators are not valid here. @@ -43,15 +32,11 @@ decoratorsOnComputedProperties.ts(101,5): error TS1206: Decorators are not valid decoratorsOnComputedProperties.ts(106,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(107,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(108,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(110,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(111,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(112,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(124,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(125,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(126,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(128,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(129,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(131,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(135,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(136,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(137,5): error TS1206: Decorators are not valid here. @@ -59,15 +44,11 @@ decoratorsOnComputedProperties.ts(138,5): error TS1206: Decorators are not valid decoratorsOnComputedProperties.ts(143,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(144,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(145,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(147,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(148,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(150,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(162,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(163,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(164,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(166,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(167,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(169,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(173,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(174,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(175,5): error TS1206: Decorators are not valid here. @@ -76,12 +57,11 @@ decoratorsOnComputedProperties.ts(181,5): error TS1166: A computed property name decoratorsOnComputedProperties.ts(182,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(183,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(184,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(185,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(186,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid here. -==== decoratorsOnComputedProperties.ts (81 errors) ==== +==== decoratorsOnComputedProperties.ts (61 errors) ==== function x(o: object, k: PropertyKey) { } let i = 0; function foo(): string { return ++i + ""; } @@ -109,14 +89,8 @@ decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid ~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. [fieldNameA]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @x [fieldNameB]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @x [fieldNameC]: any = null; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. } void class B { @@ -146,8 +120,6 @@ decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid ~ !!! error TS1206: Decorators are not valid here. [fieldNameA]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @x [fieldNameB]: any; ~ !!! error TS1206: Decorators are not valid here. @@ -175,14 +147,8 @@ decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid ~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. [fieldNameA]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @x [fieldNameB]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @x [fieldNameC]: any = null; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ["some" + "method"]() {} } @@ -213,8 +179,6 @@ decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid ~ !!! error TS1206: Decorators are not valid here. [fieldNameA]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @x [fieldNameB]: any; ~ !!! error TS1206: Decorators are not valid here. @@ -244,14 +208,8 @@ decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ["some" + "method"]() {} [fieldNameA]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @x [fieldNameB]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @x [fieldNameC]: any = null; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. } void class F { @@ -282,8 +240,6 @@ decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid !!! error TS1206: Decorators are not valid here. ["some" + "method"]() {} [fieldNameA]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @x [fieldNameB]: any; ~ !!! error TS1206: Decorators are not valid here. @@ -312,15 +268,9 @@ decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ["some" + "method"]() {} [fieldNameA]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @x [fieldNameB]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ["some" + "method2"]() {} @x [fieldNameC]: any = null; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. } void class H { @@ -351,8 +301,6 @@ decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid !!! error TS1206: Decorators are not valid here. ["some" + "method"]() {} [fieldNameA]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @x [fieldNameB]: any; ~ !!! error TS1206: Decorators are not valid here. @@ -382,15 +330,9 @@ decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @x ["some" + "method"]() {} [fieldNameA]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @x [fieldNameB]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ["some" + "method2"]() {} @x [fieldNameC]: any = null; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. } void class J { @@ -423,8 +365,6 @@ decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid ~ !!! error TS1206: Decorators are not valid here. [fieldNameA]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @x [fieldNameB]: any; ~ !!! error TS1206: Decorators are not valid here. diff --git a/testdata/baselines/reference/submodule/compiler/decoratorsOnComputedProperties.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/decoratorsOnComputedProperties.errors.txt.diff deleted file mode 100644 index f26e059fe6..0000000000 --- a/testdata/baselines/reference/submodule/compiler/decoratorsOnComputedProperties.errors.txt.diff +++ /dev/null @@ -1,212 +0,0 @@ ---- old.decoratorsOnComputedProperties.errors.txt -+++ new.decoratorsOnComputedProperties.errors.txt -@@= skipped -0, +0 lines =@@ - decoratorsOnComputedProperties.ts(18,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(19,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(20,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+decoratorsOnComputedProperties.ts(21,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+decoratorsOnComputedProperties.ts(22,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+decoratorsOnComputedProperties.ts(23,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(27,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(28,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(29,5): error TS1206: Decorators are not valid here. -@@= skipped -7, +10 lines =@@ - decoratorsOnComputedProperties.ts(35,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(36,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(37,5): error TS1206: Decorators are not valid here. -+decoratorsOnComputedProperties.ts(38,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(39,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(40,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(52,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(53,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(54,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+decoratorsOnComputedProperties.ts(55,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+decoratorsOnComputedProperties.ts(56,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+decoratorsOnComputedProperties.ts(57,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(62,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(63,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(64,5): error TS1206: Decorators are not valid here. -@@= skipped -12, +16 lines =@@ - decoratorsOnComputedProperties.ts(70,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(71,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(72,5): error TS1206: Decorators are not valid here. -+decoratorsOnComputedProperties.ts(73,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(74,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(75,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(88,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(89,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(90,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+decoratorsOnComputedProperties.ts(92,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+decoratorsOnComputedProperties.ts(93,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+decoratorsOnComputedProperties.ts(94,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(98,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(99,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(100,5): error TS1206: Decorators are not valid here. -@@= skipped -12, +16 lines =@@ - decoratorsOnComputedProperties.ts(106,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(107,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(108,5): error TS1206: Decorators are not valid here. -+decoratorsOnComputedProperties.ts(110,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(111,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(112,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(124,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(125,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(126,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+decoratorsOnComputedProperties.ts(128,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+decoratorsOnComputedProperties.ts(129,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+decoratorsOnComputedProperties.ts(131,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(135,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(136,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(137,5): error TS1206: Decorators are not valid here. -@@= skipped -12, +16 lines =@@ - decoratorsOnComputedProperties.ts(143,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(144,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(145,5): error TS1206: Decorators are not valid here. -+decoratorsOnComputedProperties.ts(147,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(148,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(150,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(162,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(163,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(164,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+decoratorsOnComputedProperties.ts(166,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+decoratorsOnComputedProperties.ts(167,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+decoratorsOnComputedProperties.ts(169,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(173,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(174,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(175,5): error TS1206: Decorators are not valid here. -@@= skipped -13, +17 lines =@@ - decoratorsOnComputedProperties.ts(182,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(183,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(184,5): error TS1206: Decorators are not valid here. -+decoratorsOnComputedProperties.ts(185,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(186,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid here. - - --==== decoratorsOnComputedProperties.ts (61 errors) ==== -+==== decoratorsOnComputedProperties.ts (81 errors) ==== - function x(o: object, k: PropertyKey) { } - let i = 0; - function foo(): string { return ++i + ""; } -@@= skipped -32, +33 lines =@@ - ~~~~~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - [fieldNameA]: any; -+ ~~~~~~~~~~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [fieldNameB]: any; -+ ~~~~~~~~~~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [fieldNameC]: any = null; -+ ~~~~~~~~~~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - } - - void class B { -@@= skipped -31, +37 lines =@@ - ~ - !!! error TS1206: Decorators are not valid here. - [fieldNameA]: any; -+ ~~~~~~~~~~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [fieldNameB]: any; - ~ - !!! error TS1206: Decorators are not valid here. -@@= skipped -27, +29 lines =@@ - ~~~~~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - [fieldNameA]: any; -+ ~~~~~~~~~~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [fieldNameB]: any; -+ ~~~~~~~~~~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [fieldNameC]: any = null; -+ ~~~~~~~~~~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ["some" + "method"]() {} - } - -@@= skipped -32, +38 lines =@@ - ~ - !!! error TS1206: Decorators are not valid here. - [fieldNameA]: any; -+ ~~~~~~~~~~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [fieldNameB]: any; - ~ - !!! error TS1206: Decorators are not valid here. -@@= skipped -29, +31 lines =@@ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ["some" + "method"]() {} - [fieldNameA]: any; -+ ~~~~~~~~~~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [fieldNameB]: any; -+ ~~~~~~~~~~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [fieldNameC]: any = null; -+ ~~~~~~~~~~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - } - - void class F { -@@= skipped -32, +38 lines =@@ - !!! error TS1206: Decorators are not valid here. - ["some" + "method"]() {} - [fieldNameA]: any; -+ ~~~~~~~~~~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [fieldNameB]: any; - ~ - !!! error TS1206: Decorators are not valid here. -@@= skipped -28, +30 lines =@@ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ["some" + "method"]() {} - [fieldNameA]: any; -+ ~~~~~~~~~~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [fieldNameB]: any; -+ ~~~~~~~~~~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ["some" + "method2"]() {} - @x [fieldNameC]: any = null; -+ ~~~~~~~~~~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - } - - void class H { -@@= skipped -33, +39 lines =@@ - !!! error TS1206: Decorators are not valid here. - ["some" + "method"]() {} - [fieldNameA]: any; -+ ~~~~~~~~~~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [fieldNameB]: any; - ~ - !!! error TS1206: Decorators are not valid here. -@@= skipped -29, +31 lines =@@ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x ["some" + "method"]() {} - [fieldNameA]: any; -+ ~~~~~~~~~~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [fieldNameB]: any; -+ ~~~~~~~~~~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ["some" + "method2"]() {} - @x [fieldNameC]: any = null; -+ ~~~~~~~~~~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - } - - void class J { -@@= skipped -35, +41 lines =@@ - ~ - !!! error TS1206: Decorators are not valid here. - [fieldNameA]: any; -+ ~~~~~~~~~~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [fieldNameB]: any; - ~ - !!! error TS1206: Decorators are not valid here. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexSignatureMustHaveTypeAnnotation.errors.txt b/testdata/baselines/reference/submodule/compiler/indexSignatureMustHaveTypeAnnotation.errors.txt index d8dcbc68bf..268ca3698b 100644 --- a/testdata/baselines/reference/submodule/compiler/indexSignatureMustHaveTypeAnnotation.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/indexSignatureMustHaveTypeAnnotation.errors.txt @@ -1,17 +1,13 @@ -indexSignatureMustHaveTypeAnnotation.ts(3,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. indexSignatureMustHaveTypeAnnotation.ts(3,6): error TS2304: Cannot find name 'x'. indexSignatureMustHaveTypeAnnotation.ts(4,5): error TS1021: An index signature must have a type annotation. -indexSignatureMustHaveTypeAnnotation.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. indexSignatureMustHaveTypeAnnotation.ts(9,6): error TS2304: Cannot find name 'x'. indexSignatureMustHaveTypeAnnotation.ts(14,5): error TS1021: An index signature must have a type annotation. -==== indexSignatureMustHaveTypeAnnotation.ts (6 errors) ==== +==== indexSignatureMustHaveTypeAnnotation.ts (4 errors) ==== interface I { // Used to be indexer, now it is a computed property [x]: string; - ~~~ -!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'x'. [x: string]; @@ -22,8 +18,6 @@ indexSignatureMustHaveTypeAnnotation.ts(14,5): error TS1021: An index signature class C { // Used to be indexer, now it is a computed property [x]: string - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'x'. diff --git a/testdata/baselines/reference/submodule/compiler/indexSignatureMustHaveTypeAnnotation.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/indexSignatureMustHaveTypeAnnotation.errors.txt.diff deleted file mode 100644 index 2146c34440..0000000000 --- a/testdata/baselines/reference/submodule/compiler/indexSignatureMustHaveTypeAnnotation.errors.txt.diff +++ /dev/null @@ -1,30 +0,0 @@ ---- old.indexSignatureMustHaveTypeAnnotation.errors.txt -+++ new.indexSignatureMustHaveTypeAnnotation.errors.txt -@@= skipped -0, +0 lines =@@ -+indexSignatureMustHaveTypeAnnotation.ts(3,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. - indexSignatureMustHaveTypeAnnotation.ts(3,6): error TS2304: Cannot find name 'x'. - indexSignatureMustHaveTypeAnnotation.ts(4,5): error TS1021: An index signature must have a type annotation. -+indexSignatureMustHaveTypeAnnotation.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - indexSignatureMustHaveTypeAnnotation.ts(9,6): error TS2304: Cannot find name 'x'. - indexSignatureMustHaveTypeAnnotation.ts(14,5): error TS1021: An index signature must have a type annotation. - - --==== indexSignatureMustHaveTypeAnnotation.ts (4 errors) ==== -+==== indexSignatureMustHaveTypeAnnotation.ts (6 errors) ==== - interface I { - // Used to be indexer, now it is a computed property - [x]: string; -+ ~~~ -+!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~ - !!! error TS2304: Cannot find name 'x'. - [x: string]; -@@= skipped -17, +21 lines =@@ - class C { - // Used to be indexer, now it is a computed property - [x]: string -+ ~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~ - !!! error TS2304: Cannot find name 'x'. - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexWithoutParamType2.errors.txt b/testdata/baselines/reference/submodule/compiler/indexWithoutParamType2.errors.txt index c44ef69c03..322a5cb854 100644 --- a/testdata/baselines/reference/submodule/compiler/indexWithoutParamType2.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/indexWithoutParamType2.errors.txt @@ -1,13 +1,10 @@ -indexWithoutParamType2.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. indexWithoutParamType2.ts(3,6): error TS2304: Cannot find name 'x'. -==== indexWithoutParamType2.ts (2 errors) ==== +==== indexWithoutParamType2.ts (1 errors) ==== class C { // Used to be indexer, now it is a computed property [x]: string - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'x'. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexWithoutParamType2.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/indexWithoutParamType2.errors.txt.diff deleted file mode 100644 index 4672c2f823..0000000000 --- a/testdata/baselines/reference/submodule/compiler/indexWithoutParamType2.errors.txt.diff +++ /dev/null @@ -1,17 +0,0 @@ ---- old.indexWithoutParamType2.errors.txt -+++ new.indexWithoutParamType2.errors.txt -@@= skipped -0, +0 lines =@@ -+indexWithoutParamType2.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - indexWithoutParamType2.ts(3,6): error TS2304: Cannot find name 'x'. - - --==== indexWithoutParamType2.ts (1 errors) ==== -+==== indexWithoutParamType2.ts (2 errors) ==== - class C { - // Used to be indexer, now it is a computed property - [x]: string -+ ~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~ - !!! error TS2304: Cannot find name 'x'. - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorsClasses.errors.txt b/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorsClasses.errors.txt index 6ace1f0a73..822b9b4f41 100644 --- a/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorsClasses.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorsClasses.errors.txt @@ -1,17 +1,15 @@ isolatedDeclarationErrorsClasses.ts(8,18): error TS7006: Parameter 'p' implicitly has an 'any' type. isolatedDeclarationErrorsClasses.ts(12,9): error TS7032: Property 'setOnly' implicitly has type 'any', because its set accessor lacks a parameter type annotation. isolatedDeclarationErrorsClasses.ts(12,17): error TS7006: Parameter 'value' implicitly has an 'any' type. -isolatedDeclarationErrorsClasses.ts(36,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. isolatedDeclarationErrorsClasses.ts(36,6): error TS2304: Cannot find name 'missing'. isolatedDeclarationErrorsClasses.ts(44,35): error TS7006: Parameter 'v' implicitly has an 'any' type. isolatedDeclarationErrorsClasses.ts(48,9): error TS7032: Property '[noParamAnnotationStringName]' implicitly has type 'any', because its set accessor lacks a parameter type annotation. isolatedDeclarationErrorsClasses.ts(48,39): error TS7006: Parameter 'value' implicitly has an 'any' type. isolatedDeclarationErrorsClasses.ts(50,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -isolatedDeclarationErrorsClasses.ts(55,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. isolatedDeclarationErrorsClasses.ts(56,5): error TS7010: '[noAnnotationLiteralName]', which lacks return-type annotation, implicitly has an 'any' return type. -==== isolatedDeclarationErrorsClasses.ts (11 errors) ==== +==== isolatedDeclarationErrorsClasses.ts (9 errors) ==== export class Cls { field = 1 + 1; @@ -54,8 +52,6 @@ isolatedDeclarationErrorsClasses.ts(56,5): error TS7010: '[noAnnotationLiteralNa // Should not be reported as an isolated declaration error [missing] = 1; - ~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~ !!! error TS2304: Cannot find name 'missing'. @@ -85,8 +81,6 @@ isolatedDeclarationErrorsClasses.ts(56,5): error TS7010: '[noAnnotationLiteralNa export interface I { [noAnnotationStringName]: 10; - ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. [noAnnotationLiteralName](); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS7010: '[noAnnotationLiteralName]', which lacks return-type annotation, implicitly has an 'any' return type. diff --git a/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorsClasses.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorsClasses.errors.txt.diff index 7e1015075f..ae4a7935ff 100644 --- a/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorsClasses.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorsClasses.errors.txt.diff @@ -11,7 +11,6 @@ isolatedDeclarationErrorsClasses.ts(12,17): error TS7006: Parameter 'value' implicitly has an 'any' type. -isolatedDeclarationErrorsClasses.ts(12,17): error TS9009: At least one accessor must have an explicit type annotation with --isolatedDeclarations. -isolatedDeclarationErrorsClasses.ts(36,5): error TS9038: Computed property names on class or object literals cannot be inferred with --isolatedDeclarations. -+isolatedDeclarationErrorsClasses.ts(36,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. isolatedDeclarationErrorsClasses.ts(36,6): error TS2304: Cannot find name 'missing'. -isolatedDeclarationErrorsClasses.ts(38,5): error TS9038: Computed property names on class or object literals cannot be inferred with --isolatedDeclarations. -isolatedDeclarationErrorsClasses.ts(40,5): error TS9038: Computed property names on class or object literals cannot be inferred with --isolatedDeclarations. @@ -26,7 +25,6 @@ isolatedDeclarationErrorsClasses.ts(48,39): error TS7006: Parameter 'value' implicitly has an 'any' type. isolatedDeclarationErrorsClasses.ts(50,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -isolatedDeclarationErrorsClasses.ts(50,5): error TS9038: Computed property names on class or object literals cannot be inferred with --isolatedDeclarations. -+isolatedDeclarationErrorsClasses.ts(55,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. isolatedDeclarationErrorsClasses.ts(56,5): error TS7010: '[noAnnotationLiteralName]', which lacks return-type annotation, implicitly has an 'any' return type. -isolatedDeclarationErrorsClasses.ts(56,5): error TS9013: Expression type can't be inferred with --isolatedDeclarations. - @@ -34,7 +32,7 @@ -==== isolatedDeclarationErrorsClasses.ts (26 errors) ==== + + -+==== isolatedDeclarationErrorsClasses.ts (11 errors) ==== ++==== isolatedDeclarationErrorsClasses.ts (9 errors) ==== export class Cls { field = 1 + 1; @@ -74,12 +72,12 @@ get getSetBad() { return 0 } set getSetBad(value) { } -@@= skipped -87, +54 lines =@@ +@@= skipped -86, +51 lines =@@ + // Should not be reported as an isolated declaration error [missing] = 1; - ~~~~~~~~~ +- ~~~~~~~~~ -!!! error TS9038: Computed property names on class or object literals cannot be inferred with --isolatedDeclarations. -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~ !!! error TS2304: Cannot find name 'missing'. @@ -127,10 +125,7 @@ } - export interface I { - [noAnnotationStringName]: 10; -+ ~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. +@@= skipped -54, +32 lines =@@ [noAnnotationLiteralName](); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS7010: '[noAnnotationLiteralName]', which lacks return-type annotation, implicitly has an 'any' return type. diff --git a/testdata/baselines/reference/submodule/compiler/overloadsWithComputedNames.errors.txt b/testdata/baselines/reference/submodule/compiler/overloadsWithComputedNames.errors.txt index 018a561832..f737574398 100644 --- a/testdata/baselines/reference/submodule/compiler/overloadsWithComputedNames.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/overloadsWithComputedNames.errors.txt @@ -1,15 +1,11 @@ overloadsWithComputedNames.ts(4,5): error TS2389: Function implementation name must be '["B"]'. overloadsWithComputedNames.ts(14,5): error TS2391: Function implementation is missing or not immediately following the declaration. overloadsWithComputedNames.ts(16,5): error TS2389: Function implementation name must be '["bar"]'. -overloadsWithComputedNames.ts(28,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. overloadsWithComputedNames.ts(29,5): error TS2391: Function implementation is missing or not immediately following the declaration. -overloadsWithComputedNames.ts(35,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. -overloadsWithComputedNames.ts(42,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -overloadsWithComputedNames.ts(47,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. overloadsWithComputedNames.ts(52,5): error TS2391: Function implementation is missing or not immediately following the declaration. -==== overloadsWithComputedNames.ts (9 errors) ==== +==== overloadsWithComputedNames.ts (5 errors) ==== // https://github.com/microsoft/TypeScript/issues/52329 class Person { ["B"](a: number): string; @@ -44,8 +40,6 @@ overloadsWithComputedNames.ts(52,5): error TS2391: Function implementation is mi class C1 { [sym](): void; // should error - ~~~~~ -!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. [uniqueSym2](): void; // should error ~~~~~~~~~~~~ !!! error TS2391: Function implementation is missing or not immediately following the declaration. @@ -55,8 +49,6 @@ overloadsWithComputedNames.ts(52,5): error TS2391: Function implementation is mi interface I1 { [sym](): void; // should error - ~~~~~ -!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. [uniqueSym2](): void; [uniqueSym](): void; [uniqueSym](): void; @@ -64,15 +56,11 @@ overloadsWithComputedNames.ts(52,5): error TS2391: Function implementation is mi class C2 { [strUnion](): void; // should error - ~~~~~~~~~~ -!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. [strUnion]() { } } class I2 { [strUnion](): void; // should error - ~~~~~~~~~~ -!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. [strUnion]() { } } diff --git a/testdata/baselines/reference/submodule/compiler/overloadsWithComputedNames.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/overloadsWithComputedNames.errors.txt.diff deleted file mode 100644 index 830a8f6a87..0000000000 --- a/testdata/baselines/reference/submodule/compiler/overloadsWithComputedNames.errors.txt.diff +++ /dev/null @@ -1,53 +0,0 @@ ---- old.overloadsWithComputedNames.errors.txt -+++ new.overloadsWithComputedNames.errors.txt -@@= skipped -0, +0 lines =@@ - overloadsWithComputedNames.ts(4,5): error TS2389: Function implementation name must be '["B"]'. - overloadsWithComputedNames.ts(14,5): error TS2391: Function implementation is missing or not immediately following the declaration. - overloadsWithComputedNames.ts(16,5): error TS2389: Function implementation name must be '["bar"]'. -+overloadsWithComputedNames.ts(28,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - overloadsWithComputedNames.ts(29,5): error TS2391: Function implementation is missing or not immediately following the declaration. -+overloadsWithComputedNames.ts(35,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. -+overloadsWithComputedNames.ts(42,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -+overloadsWithComputedNames.ts(47,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - overloadsWithComputedNames.ts(52,5): error TS2391: Function implementation is missing or not immediately following the declaration. - - --==== overloadsWithComputedNames.ts (5 errors) ==== -+==== overloadsWithComputedNames.ts (9 errors) ==== - // https://github.com/microsoft/TypeScript/issues/52329 - class Person { - ["B"](a: number): string; -@@= skipped -39, +43 lines =@@ - - class C1 { - [sym](): void; // should error -+ ~~~~~ -+!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - [uniqueSym2](): void; // should error - ~~~~~~~~~~~~ - !!! error TS2391: Function implementation is missing or not immediately following the declaration. -@@= skipped -9, +11 lines =@@ - - interface I1 { - [sym](): void; // should error -+ ~~~~~ -+!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. - [uniqueSym2](): void; - [uniqueSym](): void; - [uniqueSym](): void; -@@= skipped -7, +9 lines =@@ - - class C2 { - [strUnion](): void; // should error -+ ~~~~~~~~~~ -+!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - [strUnion]() { } - } - - class I2 { - [strUnion](): void; // should error -+ ~~~~~~~~~~ -+!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - [strUnion]() { } - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/propertyAssignment.errors.txt b/testdata/baselines/reference/submodule/compiler/propertyAssignment.errors.txt index f7ec925652..fd64c78a5b 100644 --- a/testdata/baselines/reference/submodule/compiler/propertyAssignment.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/propertyAssignment.errors.txt @@ -1,4 +1,3 @@ -propertyAssignment.ts(4,13): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. propertyAssignment.ts(4,14): error TS2304: Cannot find name 'index'. propertyAssignment.ts(12,1): error TS2322: Type '{ x: number; }' is not assignable to type 'new () => any'. Type '{ x: number; }' provides no match for the signature 'new (): any'. @@ -6,13 +5,11 @@ propertyAssignment.ts(14,1): error TS2322: Type '{ x: number; }' is not assignab Type '{ x: number; }' provides no match for the signature '(): void'. -==== propertyAssignment.ts (4 errors) ==== +==== propertyAssignment.ts (3 errors) ==== var foo1: { new ():any; } var bar1: { x : number; } var foo2: { [index]; } // should be an error, used to be indexer, now it is a computed property - ~~~~~~~ -!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~ !!! error TS2304: Cannot find name 'index'. var bar2: { x : number; } diff --git a/testdata/baselines/reference/submodule/compiler/propertyAssignment.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/propertyAssignment.errors.txt.diff deleted file mode 100644 index c35614900b..0000000000 --- a/testdata/baselines/reference/submodule/compiler/propertyAssignment.errors.txt.diff +++ /dev/null @@ -1,22 +0,0 @@ ---- old.propertyAssignment.errors.txt -+++ new.propertyAssignment.errors.txt -@@= skipped -0, +0 lines =@@ -+propertyAssignment.ts(4,13): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - propertyAssignment.ts(4,14): error TS2304: Cannot find name 'index'. - propertyAssignment.ts(12,1): error TS2322: Type '{ x: number; }' is not assignable to type 'new () => any'. - Type '{ x: number; }' provides no match for the signature 'new (): any'. -@@= skipped -4, +5 lines =@@ - Type '{ x: number; }' provides no match for the signature '(): void'. - - --==== propertyAssignment.ts (3 errors) ==== -+==== propertyAssignment.ts (4 errors) ==== - var foo1: { new ():any; } - var bar1: { x : number; } - - var foo2: { [index]; } // should be an error, used to be indexer, now it is a computed property -+ ~~~~~~~ -+!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~ - !!! error TS2304: Cannot find name 'index'. - var bar2: { x : number; } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeUsedAsTypeLiteralIndex.errors.txt b/testdata/baselines/reference/submodule/compiler/typeUsedAsTypeLiteralIndex.errors.txt index 3cd05b68c1..808e24d7b0 100644 --- a/testdata/baselines/reference/submodule/compiler/typeUsedAsTypeLiteralIndex.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/typeUsedAsTypeLiteralIndex.errors.txt @@ -1,19 +1,13 @@ -typeUsedAsTypeLiteralIndex.ts(3,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. typeUsedAsTypeLiteralIndex.ts(3,6): error TS2693: 'K' only refers to a type, but is being used as a value here. -typeUsedAsTypeLiteralIndex.ts(13,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. typeUsedAsTypeLiteralIndex.ts(13,6): error TS2693: 'K2' only refers to a type, but is being used as a value here. -typeUsedAsTypeLiteralIndex.ts(18,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. typeUsedAsTypeLiteralIndex.ts(18,6): error TS2693: 'K3' only refers to a type, but is being used as a value here. -typeUsedAsTypeLiteralIndex.ts(23,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. typeUsedAsTypeLiteralIndex.ts(23,6): error TS2693: 'K4' only refers to a type, but is being used as a value here. -==== typeUsedAsTypeLiteralIndex.ts (8 errors) ==== +==== typeUsedAsTypeLiteralIndex.ts (4 errors) ==== type K = number | string; type T = { [K]: number; // Did you mean to use 'P in K'? - ~~~ -!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ~ !!! error TS2693: 'K' only refers to a type, but is being used as a value here. } @@ -26,8 +20,6 @@ typeUsedAsTypeLiteralIndex.ts(23,6): error TS2693: 'K4' only refers to a type, b type K2 = "x" | "y"; type T2 = { [K2]: number; // Did you mean to use 'K in K2'? - ~~~~ -!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~ !!! error TS2693: 'K2' only refers to a type, but is being used as a value here. } @@ -35,8 +27,6 @@ typeUsedAsTypeLiteralIndex.ts(23,6): error TS2693: 'K4' only refers to a type, b type K3 = number | string; type T3 = { [K3]: number; // Did you mean to use 'K in K3'? - ~~~~ -!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~ !!! error TS2693: 'K3' only refers to a type, but is being used as a value here. } @@ -44,8 +34,6 @@ typeUsedAsTypeLiteralIndex.ts(23,6): error TS2693: 'K4' only refers to a type, b type K4 = number | string; type T4 = { [K4]: number; - ~~~~ -!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~ !!! error TS2693: 'K4' only refers to a type, but is being used as a value here. k4: string; diff --git a/testdata/baselines/reference/submodule/compiler/typeUsedAsTypeLiteralIndex.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/typeUsedAsTypeLiteralIndex.errors.txt.diff index fe632a1cd7..2359f73f7b 100644 --- a/testdata/baselines/reference/submodule/compiler/typeUsedAsTypeLiteralIndex.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/typeUsedAsTypeLiteralIndex.errors.txt.diff @@ -4,35 +4,24 @@ -typeUsedAsTypeLiteralIndex.ts(3,6): error TS2690: 'K' only refers to a type, but is being used as a value here. Did you mean to use 'P in K'? -typeUsedAsTypeLiteralIndex.ts(13,6): error TS2690: 'K2' only refers to a type, but is being used as a value here. Did you mean to use 'K in K2'? -typeUsedAsTypeLiteralIndex.ts(18,6): error TS2690: 'K3' only refers to a type, but is being used as a value here. Did you mean to use 'K in K3'? -+typeUsedAsTypeLiteralIndex.ts(3,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. +typeUsedAsTypeLiteralIndex.ts(3,6): error TS2693: 'K' only refers to a type, but is being used as a value here. -+typeUsedAsTypeLiteralIndex.ts(13,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. +typeUsedAsTypeLiteralIndex.ts(13,6): error TS2693: 'K2' only refers to a type, but is being used as a value here. -+typeUsedAsTypeLiteralIndex.ts(18,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. +typeUsedAsTypeLiteralIndex.ts(18,6): error TS2693: 'K3' only refers to a type, but is being used as a value here. -+typeUsedAsTypeLiteralIndex.ts(23,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. typeUsedAsTypeLiteralIndex.ts(23,6): error TS2693: 'K4' only refers to a type, but is being used as a value here. --==== typeUsedAsTypeLiteralIndex.ts (4 errors) ==== -+==== typeUsedAsTypeLiteralIndex.ts (8 errors) ==== - type K = number | string; +@@= skipped -8, +8 lines =@@ type T = { [K]: number; // Did you mean to use 'P in K'? -+ ~~~ -+!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ~ -!!! error TS2690: 'K' only refers to a type, but is being used as a value here. Did you mean to use 'P in K'? +!!! error TS2693: 'K' only refers to a type, but is being used as a value here. } const K1 = Symbol(); -@@= skipped -19, +25 lines =@@ - type K2 = "x" | "y"; +@@= skipped -12, +12 lines =@@ type T2 = { [K2]: number; // Did you mean to use 'K in K2'? -+ ~~~~ -+!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~ -!!! error TS2690: 'K2' only refers to a type, but is being used as a value here. Did you mean to use 'K in K2'? +!!! error TS2693: 'K2' only refers to a type, but is being used as a value here. @@ -41,18 +30,9 @@ type K3 = number | string; type T3 = { [K3]: number; // Did you mean to use 'K in K3'? -+ ~~~~ -+!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~ -!!! error TS2690: 'K3' only refers to a type, but is being used as a value here. Did you mean to use 'K in K3'? +!!! error TS2693: 'K3' only refers to a type, but is being used as a value here. } - type K4 = number | string; - type T4 = { - [K4]: number; -+ ~~~~ -+!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~ - !!! error TS2693: 'K4' only refers to a type, but is being used as a value here. - k4: string; \ No newline at end of file + type K4 = number | string; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/computedPropertyNames12_ES5.errors.txt b/testdata/baselines/reference/submodule/conformance/computedPropertyNames12_ES5.errors.txt index 54170d241b..7803fd8078 100644 --- a/testdata/baselines/reference/submodule/conformance/computedPropertyNames12_ES5.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/computedPropertyNames12_ES5.errors.txt @@ -1,26 +1,19 @@ -computedPropertyNames12_ES5.ts(5,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES5.ts(6,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES5.ts(7,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES5.ts(8,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES5.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES5.ts(9,5): error TS2411: Property '[+s]' of type 'string' is not assignable to 'number' index type 'number'. computedPropertyNames12_ES5.ts(9,5): error TS2411: Property '[+s]' of type 'string' is not assignable to 'string' index type 'number'. -computedPropertyNames12_ES5.ts(12,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES5.ts(13,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES5.ts(15,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -==== computedPropertyNames12_ES5.ts (10 errors) ==== +==== computedPropertyNames12_ES5.ts (7 errors) ==== var s: string; var n: number; var a: any; class C { [s]: number; - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. [n] = n; - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. static [s + s]: string; ~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -37,8 +30,6 @@ computedPropertyNames12_ES5.ts(15,12): error TS1166: A computed property name in static [""]: number; [0]: number; [a]: number; - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. static [true]: number; ~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. diff --git a/testdata/baselines/reference/submodule/conformance/computedPropertyNames12_ES5.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/computedPropertyNames12_ES5.errors.txt.diff deleted file mode 100644 index 6951b00ed5..0000000000 --- a/testdata/baselines/reference/submodule/conformance/computedPropertyNames12_ES5.errors.txt.diff +++ /dev/null @@ -1,39 +0,0 @@ ---- old.computedPropertyNames12_ES5.errors.txt -+++ new.computedPropertyNames12_ES5.errors.txt -@@= skipped -0, +0 lines =@@ -+computedPropertyNames12_ES5.ts(5,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+computedPropertyNames12_ES5.ts(6,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - computedPropertyNames12_ES5.ts(7,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - computedPropertyNames12_ES5.ts(8,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - computedPropertyNames12_ES5.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - computedPropertyNames12_ES5.ts(9,5): error TS2411: Property '[+s]' of type 'string' is not assignable to 'number' index type 'number'. - computedPropertyNames12_ES5.ts(9,5): error TS2411: Property '[+s]' of type 'string' is not assignable to 'string' index type 'number'. -+computedPropertyNames12_ES5.ts(12,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - computedPropertyNames12_ES5.ts(13,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - computedPropertyNames12_ES5.ts(15,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - - --==== computedPropertyNames12_ES5.ts (7 errors) ==== -+==== computedPropertyNames12_ES5.ts (10 errors) ==== - var s: string; - var n: number; - var a: any; - class C { - [s]: number; -+ ~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - [n] = n; -+ ~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - static [s + s]: string; - ~~~~~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -@@= skipped -29, +36 lines =@@ - static [""]: number; - [0]: number; - [a]: number; -+ ~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - static [true]: number; - ~~~~~~~~~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/computedPropertyNames12_ES6.errors.txt b/testdata/baselines/reference/submodule/conformance/computedPropertyNames12_ES6.errors.txt index 045be616de..08016db3dd 100644 --- a/testdata/baselines/reference/submodule/conformance/computedPropertyNames12_ES6.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/computedPropertyNames12_ES6.errors.txt @@ -1,26 +1,19 @@ -computedPropertyNames12_ES6.ts(5,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES6.ts(6,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES6.ts(7,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES6.ts(8,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES6.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES6.ts(9,5): error TS2411: Property '[+s]' of type 'string' is not assignable to 'number' index type 'number'. computedPropertyNames12_ES6.ts(9,5): error TS2411: Property '[+s]' of type 'string' is not assignable to 'string' index type 'number'. -computedPropertyNames12_ES6.ts(12,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES6.ts(13,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES6.ts(15,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -==== computedPropertyNames12_ES6.ts (10 errors) ==== +==== computedPropertyNames12_ES6.ts (7 errors) ==== var s: string; var n: number; var a: any; class C { [s]: number; - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. [n] = n; - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. static [s + s]: string; ~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -37,8 +30,6 @@ computedPropertyNames12_ES6.ts(15,12): error TS1166: A computed property name in static [""]: number; [0]: number; [a]: number; - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. static [true]: number; ~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. diff --git a/testdata/baselines/reference/submodule/conformance/computedPropertyNames12_ES6.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/computedPropertyNames12_ES6.errors.txt.diff deleted file mode 100644 index 096a84267b..0000000000 --- a/testdata/baselines/reference/submodule/conformance/computedPropertyNames12_ES6.errors.txt.diff +++ /dev/null @@ -1,39 +0,0 @@ ---- old.computedPropertyNames12_ES6.errors.txt -+++ new.computedPropertyNames12_ES6.errors.txt -@@= skipped -0, +0 lines =@@ -+computedPropertyNames12_ES6.ts(5,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+computedPropertyNames12_ES6.ts(6,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - computedPropertyNames12_ES6.ts(7,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - computedPropertyNames12_ES6.ts(8,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - computedPropertyNames12_ES6.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - computedPropertyNames12_ES6.ts(9,5): error TS2411: Property '[+s]' of type 'string' is not assignable to 'number' index type 'number'. - computedPropertyNames12_ES6.ts(9,5): error TS2411: Property '[+s]' of type 'string' is not assignable to 'string' index type 'number'. -+computedPropertyNames12_ES6.ts(12,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - computedPropertyNames12_ES6.ts(13,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - computedPropertyNames12_ES6.ts(15,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - - --==== computedPropertyNames12_ES6.ts (7 errors) ==== -+==== computedPropertyNames12_ES6.ts (10 errors) ==== - var s: string; - var n: number; - var a: any; - class C { - [s]: number; -+ ~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - [n] = n; -+ ~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - static [s + s]: string; - ~~~~~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -@@= skipped -29, +36 lines =@@ - static [""]: number; - [0]: number; - [a]: number; -+ ~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - static [true]: number; - ~~~~~~~~~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/computedPropertyNamesOnOverloads_ES5.errors.txt b/testdata/baselines/reference/submodule/conformance/computedPropertyNamesOnOverloads_ES5.errors.txt deleted file mode 100644 index 50cecd98bd..0000000000 --- a/testdata/baselines/reference/submodule/conformance/computedPropertyNamesOnOverloads_ES5.errors.txt +++ /dev/null @@ -1,16 +0,0 @@ -computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - - -==== computedPropertyNamesOnOverloads_ES5.ts (2 errors) ==== - var methodName = "method"; - var accessorName = "accessor"; - class C { - [methodName](v: string); - ~~~~~~~~~~~~ -!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - [methodName](); - ~~~~~~~~~~~~ -!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - [methodName](v?: string) { } - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/computedPropertyNamesOnOverloads_ES5.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/computedPropertyNamesOnOverloads_ES5.errors.txt.diff deleted file mode 100644 index c5f57b5335..0000000000 --- a/testdata/baselines/reference/submodule/conformance/computedPropertyNamesOnOverloads_ES5.errors.txt.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.computedPropertyNamesOnOverloads_ES5.errors.txt -+++ new.computedPropertyNamesOnOverloads_ES5.errors.txt -@@= skipped -0, +0 lines =@@ -- -+computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -+computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -+ -+ -+==== computedPropertyNamesOnOverloads_ES5.ts (2 errors) ==== -+ var methodName = "method"; -+ var accessorName = "accessor"; -+ class C { -+ [methodName](v: string); -+ ~~~~~~~~~~~~ -+!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -+ [methodName](); -+ ~~~~~~~~~~~~ -+!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -+ [methodName](v?: string) { } -+ } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/computedPropertyNamesOnOverloads_ES6.errors.txt b/testdata/baselines/reference/submodule/conformance/computedPropertyNamesOnOverloads_ES6.errors.txt deleted file mode 100644 index c5e632c6de..0000000000 --- a/testdata/baselines/reference/submodule/conformance/computedPropertyNamesOnOverloads_ES6.errors.txt +++ /dev/null @@ -1,16 +0,0 @@ -computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - - -==== computedPropertyNamesOnOverloads_ES6.ts (2 errors) ==== - var methodName = "method"; - var accessorName = "accessor"; - class C { - [methodName](v: string); - ~~~~~~~~~~~~ -!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - [methodName](); - ~~~~~~~~~~~~ -!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - [methodName](v?: string) { } - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/computedPropertyNamesOnOverloads_ES6.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/computedPropertyNamesOnOverloads_ES6.errors.txt.diff deleted file mode 100644 index 2c2e44e3f3..0000000000 --- a/testdata/baselines/reference/submodule/conformance/computedPropertyNamesOnOverloads_ES6.errors.txt.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.computedPropertyNamesOnOverloads_ES6.errors.txt -+++ new.computedPropertyNamesOnOverloads_ES6.errors.txt -@@= skipped -0, +0 lines =@@ -- -+computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -+computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -+ -+ -+==== computedPropertyNamesOnOverloads_ES6.ts (2 errors) ==== -+ var methodName = "method"; -+ var accessorName = "accessor"; -+ class C { -+ [methodName](v: string); -+ ~~~~~~~~~~~~ -+!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -+ [methodName](); -+ ~~~~~~~~~~~~ -+!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -+ [methodName](v?: string) { } -+ } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/esDecorators-classDeclaration-missingEmitHelpers-staticComputedAutoAccessor.errors.txt b/testdata/baselines/reference/submodule/conformance/esDecorators-classDeclaration-missingEmitHelpers-staticComputedAutoAccessor.errors.txt deleted file mode 100644 index 0e1e5b2ccf..0000000000 --- a/testdata/baselines/reference/submodule/conformance/esDecorators-classDeclaration-missingEmitHelpers-staticComputedAutoAccessor.errors.txt +++ /dev/null @@ -1,19 +0,0 @@ -main.ts(8,26): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - - -==== main.ts (1 errors) ==== - export {} - - declare var dec: any; - declare var x: any; - - // needs: __esDecorate, __runInitializers, __propKey - class C { - @dec static accessor [x]: any; - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - } - -==== tslib.d.ts (0 errors) ==== - export {} - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/esDecorators-classDeclaration-missingEmitHelpers-staticComputedAutoAccessor.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/esDecorators-classDeclaration-missingEmitHelpers-staticComputedAutoAccessor.errors.txt.diff index cb61f2cfd1..86ca363d87 100644 --- a/testdata/baselines/reference/submodule/conformance/esDecorators-classDeclaration-missingEmitHelpers-staticComputedAutoAccessor.errors.txt.diff +++ b/testdata/baselines/reference/submodule/conformance/esDecorators-classDeclaration-missingEmitHelpers-staticComputedAutoAccessor.errors.txt.diff @@ -7,25 +7,23 @@ - - -==== main.ts (3 errors) ==== -+main.ts(8,26): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+ -+ -+==== main.ts (1 errors) ==== - export {} - - declare var dec: any; -@@= skipped -11, +9 lines =@@ - // needs: __esDecorate, __runInitializers, __propKey - class C { - @dec static accessor [x]: any; +- export {} +- +- declare var dec: any; +- declare var x: any; +- +- // needs: __esDecorate, __runInitializers, __propKey +- class C { +- @dec static accessor [x]: any; - ~~~~ -!!! error TS2343: This syntax requires an imported helper named '__esDecorate' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. - ~~~~ -!!! error TS2343: This syntax requires an imported helper named '__propKey' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. - ~~~~ -!!! error TS2343: This syntax requires an imported helper named '__runInitializers' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. -+ ~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - } - - ==== tslib.d.ts (0 errors) ==== \ No newline at end of file +- } +- +-==== tslib.d.ts (0 errors) ==== +- export {} +- ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/esDecorators-classDeclaration-missingEmitHelpers-staticComputedField.errors.txt b/testdata/baselines/reference/submodule/conformance/esDecorators-classDeclaration-missingEmitHelpers-staticComputedField.errors.txt deleted file mode 100644 index 27d8bd5233..0000000000 --- a/testdata/baselines/reference/submodule/conformance/esDecorators-classDeclaration-missingEmitHelpers-staticComputedField.errors.txt +++ /dev/null @@ -1,19 +0,0 @@ -main.ts(8,17): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - - -==== main.ts (1 errors) ==== - export {} - - declare var dec: any; - declare var x: any; - - // needs: __esDecorate, __runInitializers, __propKey - class C { - @dec static [x]: any; - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - } - -==== tslib.d.ts (0 errors) ==== - export {} - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/esDecorators-classDeclaration-missingEmitHelpers-staticComputedField.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/esDecorators-classDeclaration-missingEmitHelpers-staticComputedField.errors.txt.diff index b72d8bff09..0f8c2ca87f 100644 --- a/testdata/baselines/reference/submodule/conformance/esDecorators-classDeclaration-missingEmitHelpers-staticComputedField.errors.txt.diff +++ b/testdata/baselines/reference/submodule/conformance/esDecorators-classDeclaration-missingEmitHelpers-staticComputedField.errors.txt.diff @@ -7,25 +7,23 @@ - - -==== main.ts (3 errors) ==== -+main.ts(8,17): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+ -+ -+==== main.ts (1 errors) ==== - export {} - - declare var dec: any; -@@= skipped -11, +9 lines =@@ - // needs: __esDecorate, __runInitializers, __propKey - class C { - @dec static [x]: any; +- export {} +- +- declare var dec: any; +- declare var x: any; +- +- // needs: __esDecorate, __runInitializers, __propKey +- class C { +- @dec static [x]: any; - ~~~~ -!!! error TS2343: This syntax requires an imported helper named '__esDecorate' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. - ~~~~ -!!! error TS2343: This syntax requires an imported helper named '__propKey' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. - ~~~~ -!!! error TS2343: This syntax requires an imported helper named '__runInitializers' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. -+ ~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - } - - ==== tslib.d.ts (0 errors) ==== \ No newline at end of file +- } +- +-==== tslib.d.ts (0 errors) ==== +- export {} +- ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/esDecorators-classExpression-missingEmitHelpers-classDecorator.16.errors.txt b/testdata/baselines/reference/submodule/conformance/esDecorators-classExpression-missingEmitHelpers-classDecorator.16.errors.txt deleted file mode 100644 index 2dd03c451d..0000000000 --- a/testdata/baselines/reference/submodule/conformance/esDecorators-classExpression-missingEmitHelpers-classDecorator.16.errors.txt +++ /dev/null @@ -1,16 +0,0 @@ -main.ts(6,11): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - - -==== main.ts (1 errors) ==== - export {}; - declare var dec: any; - declare var x: any; - - // uses __esDecorate, __runInitializers, __setFunctionName, __propKey - class C { [x] = @dec class {} } - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - -==== tslib.d.ts (0 errors) ==== - export {} - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/esDecorators-classExpression-missingEmitHelpers-classDecorator.16.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/esDecorators-classExpression-missingEmitHelpers-classDecorator.16.errors.txt.diff index 63a7c3d6cf..40b973abf2 100644 --- a/testdata/baselines/reference/submodule/conformance/esDecorators-classExpression-missingEmitHelpers-classDecorator.16.errors.txt.diff +++ b/testdata/baselines/reference/submodule/conformance/esDecorators-classExpression-missingEmitHelpers-classDecorator.16.errors.txt.diff @@ -8,16 +8,12 @@ - - -==== main.ts (4 errors) ==== -+main.ts(6,11): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+ -+ -+==== main.ts (1 errors) ==== - export {}; - declare var dec: any; - declare var x: any; - - // uses __esDecorate, __runInitializers, __setFunctionName, __propKey - class C { [x] = @dec class {} } +- export {}; +- declare var dec: any; +- declare var x: any; +- +- // uses __esDecorate, __runInitializers, __setFunctionName, __propKey +- class C { [x] = @dec class {} } - ~~~~ -!!! error TS2343: This syntax requires an imported helper named '__esDecorate' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. - ~~~~ @@ -26,8 +22,8 @@ -!!! error TS2343: This syntax requires an imported helper named '__runInitializers' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. - ~~~~ -!!! error TS2343: This syntax requires an imported helper named '__setFunctionName' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. -+ ~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - - ==== tslib.d.ts (0 errors) ==== - export {} \ No newline at end of file +- +-==== tslib.d.ts (0 errors) ==== +- export {} +- ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName10.errors.txt b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName10.errors.txt index 32fbe01359..741471e54a 100644 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName10.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName10.errors.txt @@ -1,12 +1,9 @@ -parserComputedPropertyName10.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserComputedPropertyName10.ts(2,5): error TS2304: Cannot find name 'e'. -==== parserComputedPropertyName10.ts (2 errors) ==== +==== parserComputedPropertyName10.ts (1 errors) ==== class C { [e] = 1 - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'e'. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName10.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName10.errors.txt.diff deleted file mode 100644 index 59937009bb..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName10.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.parserComputedPropertyName10.errors.txt -+++ new.parserComputedPropertyName10.errors.txt -@@= skipped -0, +0 lines =@@ -+parserComputedPropertyName10.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - parserComputedPropertyName10.ts(2,5): error TS2304: Cannot find name 'e'. - - --==== parserComputedPropertyName10.ts (1 errors) ==== -+==== parserComputedPropertyName10.ts (2 errors) ==== - class C { - [e] = 1 -+ ~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~ - !!! error TS2304: Cannot find name 'e'. - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName11.errors.txt b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName11.errors.txt index cfe94442ff..4dfe2f9d82 100644 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName11.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName11.errors.txt @@ -1,12 +1,9 @@ -parserComputedPropertyName11.ts(2,4): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. parserComputedPropertyName11.ts(2,5): error TS2304: Cannot find name 'e'. -==== parserComputedPropertyName11.ts (2 errors) ==== +==== parserComputedPropertyName11.ts (1 errors) ==== class C { [e](); - ~~~ -!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'e'. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName11.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName11.errors.txt.diff deleted file mode 100644 index 3206c222ff..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName11.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.parserComputedPropertyName11.errors.txt -+++ new.parserComputedPropertyName11.errors.txt -@@= skipped -0, +0 lines =@@ -+parserComputedPropertyName11.ts(2,4): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - parserComputedPropertyName11.ts(2,5): error TS2304: Cannot find name 'e'. - - --==== parserComputedPropertyName11.ts (1 errors) ==== -+==== parserComputedPropertyName11.ts (2 errors) ==== - class C { - [e](); -+ ~~~ -+!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~ - !!! error TS2304: Cannot find name 'e'. - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName13.errors.txt b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName13.errors.txt index 69b30e2c35..53c44acb4a 100644 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName13.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName13.errors.txt @@ -1,10 +1,7 @@ -parserComputedPropertyName13.ts(1,10): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. parserComputedPropertyName13.ts(1,11): error TS2304: Cannot find name 'e'. -==== parserComputedPropertyName13.ts (2 errors) ==== +==== parserComputedPropertyName13.ts (1 errors) ==== var v: { [e]: number }; - ~~~ -!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName13.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName13.errors.txt.diff deleted file mode 100644 index ec3ed88eab..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName13.errors.txt.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- old.parserComputedPropertyName13.errors.txt -+++ new.parserComputedPropertyName13.errors.txt -@@= skipped -0, +0 lines =@@ -+parserComputedPropertyName13.ts(1,10): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - parserComputedPropertyName13.ts(1,11): error TS2304: Cannot find name 'e'. - - --==== parserComputedPropertyName13.ts (1 errors) ==== -+==== parserComputedPropertyName13.ts (2 errors) ==== - var v: { [e]: number }; -+ ~~~ -+!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~ - !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName14.errors.txt b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName14.errors.txt index 3136843bcf..5c6ae269c4 100644 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName14.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName14.errors.txt @@ -1,10 +1,7 @@ -parserComputedPropertyName14.ts(1,10): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. parserComputedPropertyName14.ts(1,11): error TS2304: Cannot find name 'e'. -==== parserComputedPropertyName14.ts (2 errors) ==== +==== parserComputedPropertyName14.ts (1 errors) ==== var v: { [e](): number }; - ~~~ -!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName14.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName14.errors.txt.diff deleted file mode 100644 index 7eb1ea3c90..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName14.errors.txt.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- old.parserComputedPropertyName14.errors.txt -+++ new.parserComputedPropertyName14.errors.txt -@@= skipped -0, +0 lines =@@ -+parserComputedPropertyName14.ts(1,10): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - parserComputedPropertyName14.ts(1,11): error TS2304: Cannot find name 'e'. - - --==== parserComputedPropertyName14.ts (1 errors) ==== -+==== parserComputedPropertyName14.ts (2 errors) ==== - var v: { [e](): number }; -+ ~~~ -+!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~ - !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName15.errors.txt b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName15.errors.txt index 29736f6b09..227273a64d 100644 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName15.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName15.errors.txt @@ -1,10 +1,7 @@ -parserComputedPropertyName15.ts(1,31): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. parserComputedPropertyName15.ts(1,32): error TS2304: Cannot find name 'e'. -==== parserComputedPropertyName15.ts (2 errors) ==== +==== parserComputedPropertyName15.ts (1 errors) ==== var v: { [e: number]: string; [e]: number }; - ~~~ -!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName15.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName15.errors.txt.diff deleted file mode 100644 index bb38b83760..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName15.errors.txt.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- old.parserComputedPropertyName15.errors.txt -+++ new.parserComputedPropertyName15.errors.txt -@@= skipped -0, +0 lines =@@ -+parserComputedPropertyName15.ts(1,31): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - parserComputedPropertyName15.ts(1,32): error TS2304: Cannot find name 'e'. - - --==== parserComputedPropertyName15.ts (1 errors) ==== -+==== parserComputedPropertyName15.ts (2 errors) ==== - var v: { [e: number]: string; [e]: number }; -+ ~~~ -+!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~ - !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName18.errors.txt b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName18.errors.txt index 2397af84fb..0d22c4cd91 100644 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName18.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName18.errors.txt @@ -1,10 +1,7 @@ -parserComputedPropertyName18.ts(1,10): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. parserComputedPropertyName18.ts(1,11): error TS2304: Cannot find name 'e'. -==== parserComputedPropertyName18.ts (2 errors) ==== +==== parserComputedPropertyName18.ts (1 errors) ==== var v: { [e]?(): number }; - ~~~ -!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName18.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName18.errors.txt.diff deleted file mode 100644 index 24ba7edfc5..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName18.errors.txt.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- old.parserComputedPropertyName18.errors.txt -+++ new.parserComputedPropertyName18.errors.txt -@@= skipped -0, +0 lines =@@ -+parserComputedPropertyName18.ts(1,10): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - parserComputedPropertyName18.ts(1,11): error TS2304: Cannot find name 'e'. - - --==== parserComputedPropertyName18.ts (1 errors) ==== -+==== parserComputedPropertyName18.ts (2 errors) ==== - var v: { [e]?(): number }; -+ ~~~ -+!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~ - !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName19.errors.txt b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName19.errors.txt index 5be905e3aa..5210616149 100644 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName19.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName19.errors.txt @@ -1,10 +1,7 @@ -parserComputedPropertyName19.ts(1,10): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. parserComputedPropertyName19.ts(1,11): error TS2304: Cannot find name 'e'. -==== parserComputedPropertyName19.ts (2 errors) ==== +==== parserComputedPropertyName19.ts (1 errors) ==== var v: { [e]? }; - ~~~ -!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName19.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName19.errors.txt.diff deleted file mode 100644 index dd44bf7de9..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName19.errors.txt.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- old.parserComputedPropertyName19.errors.txt -+++ new.parserComputedPropertyName19.errors.txt -@@= skipped -0, +0 lines =@@ -+parserComputedPropertyName19.ts(1,10): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - parserComputedPropertyName19.ts(1,11): error TS2304: Cannot find name 'e'. - - --==== parserComputedPropertyName19.ts (1 errors) ==== -+==== parserComputedPropertyName19.ts (2 errors) ==== - var v: { [e]? }; -+ ~~~ -+!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~ - !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName20.errors.txt b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName20.errors.txt index d29e06ed30..b7030748fe 100644 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName20.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName20.errors.txt @@ -1,12 +1,9 @@ -parserComputedPropertyName20.ts(2,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. parserComputedPropertyName20.ts(2,6): error TS2304: Cannot find name 'e'. -==== parserComputedPropertyName20.ts (2 errors) ==== +==== parserComputedPropertyName20.ts (1 errors) ==== interface I { [e](): number - ~~~ -!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'e'. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName20.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName20.errors.txt.diff deleted file mode 100644 index bf379a0a17..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName20.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.parserComputedPropertyName20.errors.txt -+++ new.parserComputedPropertyName20.errors.txt -@@= skipped -0, +0 lines =@@ -+parserComputedPropertyName20.ts(2,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. - parserComputedPropertyName20.ts(2,6): error TS2304: Cannot find name 'e'. - - --==== parserComputedPropertyName20.ts (1 errors) ==== -+==== parserComputedPropertyName20.ts (2 errors) ==== - interface I { - [e](): number -+ ~~~ -+!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~ - !!! error TS2304: Cannot find name 'e'. - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName21.errors.txt b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName21.errors.txt index d45641eaf3..2af44eefc8 100644 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName21.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName21.errors.txt @@ -1,12 +1,9 @@ -parserComputedPropertyName21.ts(2,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. parserComputedPropertyName21.ts(2,6): error TS2304: Cannot find name 'e'. -==== parserComputedPropertyName21.ts (2 errors) ==== +==== parserComputedPropertyName21.ts (1 errors) ==== interface I { [e]: number - ~~~ -!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'e'. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName21.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName21.errors.txt.diff deleted file mode 100644 index 6bc0408872..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName21.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.parserComputedPropertyName21.errors.txt -+++ new.parserComputedPropertyName21.errors.txt -@@= skipped -0, +0 lines =@@ -+parserComputedPropertyName21.ts(2,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. - parserComputedPropertyName21.ts(2,6): error TS2304: Cannot find name 'e'. - - --==== parserComputedPropertyName21.ts (1 errors) ==== -+==== parserComputedPropertyName21.ts (2 errors) ==== - interface I { - [e]: number -+ ~~~ -+!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~ - !!! error TS2304: Cannot find name 'e'. - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName22.errors.txt b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName22.errors.txt index 684b9b0fb5..d17736855f 100644 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName22.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName22.errors.txt @@ -1,12 +1,9 @@ -parserComputedPropertyName22.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserComputedPropertyName22.ts(2,6): error TS2304: Cannot find name 'e'. -==== parserComputedPropertyName22.ts (2 errors) ==== +==== parserComputedPropertyName22.ts (1 errors) ==== declare class C { [e]: number - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'e'. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName22.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName22.errors.txt.diff deleted file mode 100644 index 21147a3225..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName22.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.parserComputedPropertyName22.errors.txt -+++ new.parserComputedPropertyName22.errors.txt -@@= skipped -0, +0 lines =@@ -+parserComputedPropertyName22.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - parserComputedPropertyName22.ts(2,6): error TS2304: Cannot find name 'e'. - - --==== parserComputedPropertyName22.ts (1 errors) ==== -+==== parserComputedPropertyName22.ts (2 errors) ==== - declare class C { - [e]: number -+ ~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~ - !!! error TS2304: Cannot find name 'e'. - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName25.errors.txt b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName25.errors.txt index 01abebb987..36df2f0397 100644 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName25.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName25.errors.txt @@ -1,14 +1,11 @@ -parserComputedPropertyName25.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserComputedPropertyName25.ts(3,6): error TS2304: Cannot find name 'e'. parserComputedPropertyName25.ts(4,6): error TS2304: Cannot find name 'e2'. -==== parserComputedPropertyName25.ts (3 errors) ==== +==== parserComputedPropertyName25.ts (2 errors) ==== class C { // No ASI [e] = 0 - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'e'. [e2] = 1 diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName25.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName25.errors.txt.diff deleted file mode 100644 index 6c1e3935f5..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName25.errors.txt.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- old.parserComputedPropertyName25.errors.txt -+++ new.parserComputedPropertyName25.errors.txt -@@= skipped -0, +0 lines =@@ -+parserComputedPropertyName25.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - parserComputedPropertyName25.ts(3,6): error TS2304: Cannot find name 'e'. - parserComputedPropertyName25.ts(4,6): error TS2304: Cannot find name 'e2'. - - --==== parserComputedPropertyName25.ts (2 errors) ==== -+==== parserComputedPropertyName25.ts (3 errors) ==== - class C { - // No ASI - [e] = 0 -+ ~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~ - !!! error TS2304: Cannot find name 'e'. - [e2] = 1 \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName28.errors.txt b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName28.errors.txt index 91c6094a7b..c9df8537bb 100644 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName28.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName28.errors.txt @@ -1,19 +1,13 @@ -parserComputedPropertyName28.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserComputedPropertyName28.ts(2,6): error TS2304: Cannot find name 'e'. -parserComputedPropertyName28.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserComputedPropertyName28.ts(3,6): error TS2304: Cannot find name 'e2'. -==== parserComputedPropertyName28.ts (4 errors) ==== +==== parserComputedPropertyName28.ts (2 errors) ==== class C { [e]: number = 0; - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'e'. [e2]: number - ~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~ !!! error TS2304: Cannot find name 'e2'. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName28.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName28.errors.txt.diff deleted file mode 100644 index 0a910cc67d..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName28.errors.txt.diff +++ /dev/null @@ -1,23 +0,0 @@ ---- old.parserComputedPropertyName28.errors.txt -+++ new.parserComputedPropertyName28.errors.txt -@@= skipped -0, +0 lines =@@ -+parserComputedPropertyName28.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - parserComputedPropertyName28.ts(2,6): error TS2304: Cannot find name 'e'. -+parserComputedPropertyName28.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - parserComputedPropertyName28.ts(3,6): error TS2304: Cannot find name 'e2'. - - --==== parserComputedPropertyName28.ts (2 errors) ==== -+==== parserComputedPropertyName28.ts (4 errors) ==== - class C { - [e]: number = 0; -+ ~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~ - !!! error TS2304: Cannot find name 'e'. - [e2]: number -+ ~~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~ - !!! error TS2304: Cannot find name 'e2'. - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName29.errors.txt b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName29.errors.txt index 86ae960157..400a280cf2 100644 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName29.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName29.errors.txt @@ -1,23 +1,17 @@ -parserComputedPropertyName29.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserComputedPropertyName29.ts(3,6): error TS2304: Cannot find name 'e'. parserComputedPropertyName29.ts(3,11): error TS2304: Cannot find name 'id'. -parserComputedPropertyName29.ts(4,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserComputedPropertyName29.ts(4,6): error TS2304: Cannot find name 'e2'. -==== parserComputedPropertyName29.ts (5 errors) ==== +==== parserComputedPropertyName29.ts (3 errors) ==== class C { // yes ASI [e] = id++ - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'e'. ~~ !!! error TS2304: Cannot find name 'id'. [e2]: number - ~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~ !!! error TS2304: Cannot find name 'e2'. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName29.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName29.errors.txt.diff deleted file mode 100644 index 8635f8594a..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName29.errors.txt.diff +++ /dev/null @@ -1,27 +0,0 @@ ---- old.parserComputedPropertyName29.errors.txt -+++ new.parserComputedPropertyName29.errors.txt -@@= skipped -0, +0 lines =@@ -+parserComputedPropertyName29.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - parserComputedPropertyName29.ts(3,6): error TS2304: Cannot find name 'e'. - parserComputedPropertyName29.ts(3,11): error TS2304: Cannot find name 'id'. -+parserComputedPropertyName29.ts(4,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - parserComputedPropertyName29.ts(4,6): error TS2304: Cannot find name 'e2'. - - --==== parserComputedPropertyName29.ts (3 errors) ==== -+==== parserComputedPropertyName29.ts (5 errors) ==== - class C { - // yes ASI - [e] = id++ -+ ~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~ - !!! error TS2304: Cannot find name 'e'. - ~~ - !!! error TS2304: Cannot find name 'id'. - [e2]: number -+ ~~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~ - !!! error TS2304: Cannot find name 'e2'. - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName31.errors.txt b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName31.errors.txt index eb373b7f4f..da4a580e9d 100644 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName31.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName31.errors.txt @@ -1,20 +1,14 @@ -parserComputedPropertyName31.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserComputedPropertyName31.ts(3,6): error TS2304: Cannot find name 'e'. -parserComputedPropertyName31.ts(4,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserComputedPropertyName31.ts(4,6): error TS2304: Cannot find name 'e2'. -==== parserComputedPropertyName31.ts (4 errors) ==== +==== parserComputedPropertyName31.ts (2 errors) ==== class C { // yes ASI [e]: number - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'e'. [e2]: number - ~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~ !!! error TS2304: Cannot find name 'e2'. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName31.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName31.errors.txt.diff deleted file mode 100644 index 653c00c32a..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName31.errors.txt.diff +++ /dev/null @@ -1,24 +0,0 @@ ---- old.parserComputedPropertyName31.errors.txt -+++ new.parserComputedPropertyName31.errors.txt -@@= skipped -0, +0 lines =@@ -+parserComputedPropertyName31.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - parserComputedPropertyName31.ts(3,6): error TS2304: Cannot find name 'e'. -+parserComputedPropertyName31.ts(4,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - parserComputedPropertyName31.ts(4,6): error TS2304: Cannot find name 'e2'. - - --==== parserComputedPropertyName31.ts (2 errors) ==== -+==== parserComputedPropertyName31.ts (4 errors) ==== - class C { - // yes ASI - [e]: number -+ ~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~ - !!! error TS2304: Cannot find name 'e'. - [e2]: number -+ ~~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~ - !!! error TS2304: Cannot find name 'e2'. - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName32.errors.txt b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName32.errors.txt index 8afa1a90c8..969e09b6e6 100644 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName32.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName32.errors.txt @@ -1,12 +1,9 @@ -parserComputedPropertyName32.ts(2,5): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. parserComputedPropertyName32.ts(2,6): error TS2304: Cannot find name 'e'. -==== parserComputedPropertyName32.ts (2 errors) ==== +==== parserComputedPropertyName32.ts (1 errors) ==== declare class C { [e](): number - ~~~ -!!! error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'e'. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName32.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName32.errors.txt.diff deleted file mode 100644 index bc8cb76b23..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName32.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.parserComputedPropertyName32.errors.txt -+++ new.parserComputedPropertyName32.errors.txt -@@= skipped -0, +0 lines =@@ -+parserComputedPropertyName32.ts(2,5): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. - parserComputedPropertyName32.ts(2,6): error TS2304: Cannot find name 'e'. - - --==== parserComputedPropertyName32.ts (1 errors) ==== -+==== parserComputedPropertyName32.ts (2 errors) ==== - declare class C { - [e](): number -+ ~~~ -+!!! error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~ - !!! error TS2304: Cannot find name 'e'. - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName36.errors.txt b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName36.errors.txt index 93f41eafb3..9232b4dc95 100644 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName36.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName36.errors.txt @@ -1,13 +1,10 @@ -parserComputedPropertyName36.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserComputedPropertyName36.ts(2,6): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. parserComputedPropertyName36.ts(2,6): error TS2304: Cannot find name 'public'. -==== parserComputedPropertyName36.ts (3 errors) ==== +==== parserComputedPropertyName36.ts (2 errors) ==== class C { [public ]: string; - ~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~ !!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. ~~~~~~ diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName36.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName36.errors.txt.diff deleted file mode 100644 index f5aa527b02..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName36.errors.txt.diff +++ /dev/null @@ -1,17 +0,0 @@ ---- old.parserComputedPropertyName36.errors.txt -+++ new.parserComputedPropertyName36.errors.txt -@@= skipped -0, +0 lines =@@ -+parserComputedPropertyName36.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - parserComputedPropertyName36.ts(2,6): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. - parserComputedPropertyName36.ts(2,6): error TS2304: Cannot find name 'public'. - - --==== parserComputedPropertyName36.ts (2 errors) ==== -+==== parserComputedPropertyName36.ts (3 errors) ==== - class C { - [public ]: string; -+ ~~~~~~~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~ - !!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. - ~~~~~~ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName7.errors.txt b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName7.errors.txt index 4e8af831f3..0f2e575c27 100644 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName7.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName7.errors.txt @@ -1,12 +1,9 @@ -parserComputedPropertyName7.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserComputedPropertyName7.ts(2,5): error TS2304: Cannot find name 'e'. -==== parserComputedPropertyName7.ts (2 errors) ==== +==== parserComputedPropertyName7.ts (1 errors) ==== class C { [e] - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'e'. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName7.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName7.errors.txt.diff deleted file mode 100644 index c506d00699..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName7.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.parserComputedPropertyName7.errors.txt -+++ new.parserComputedPropertyName7.errors.txt -@@= skipped -0, +0 lines =@@ -+parserComputedPropertyName7.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - parserComputedPropertyName7.ts(2,5): error TS2304: Cannot find name 'e'. - - --==== parserComputedPropertyName7.ts (1 errors) ==== -+==== parserComputedPropertyName7.ts (2 errors) ==== - class C { - [e] -+ ~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~ - !!! error TS2304: Cannot find name 'e'. - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName8.errors.txt b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName8.errors.txt index 4e78253d91..aeecc4322a 100644 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName8.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName8.errors.txt @@ -1,12 +1,9 @@ -parserComputedPropertyName8.ts(2,11): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserComputedPropertyName8.ts(2,12): error TS2304: Cannot find name 'e'. -==== parserComputedPropertyName8.ts (2 errors) ==== +==== parserComputedPropertyName8.ts (1 errors) ==== class C { public [e] - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'e'. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName8.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName8.errors.txt.diff deleted file mode 100644 index 2b542ded55..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName8.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.parserComputedPropertyName8.errors.txt -+++ new.parserComputedPropertyName8.errors.txt -@@= skipped -0, +0 lines =@@ -+parserComputedPropertyName8.ts(2,11): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - parserComputedPropertyName8.ts(2,12): error TS2304: Cannot find name 'e'. - - --==== parserComputedPropertyName8.ts (1 errors) ==== -+==== parserComputedPropertyName8.ts (2 errors) ==== - class C { - public [e] -+ ~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~ - !!! error TS2304: Cannot find name 'e'. - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName9.errors.txt b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName9.errors.txt index 514b4f14a9..f51501e848 100644 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName9.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName9.errors.txt @@ -1,13 +1,10 @@ -parserComputedPropertyName9.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserComputedPropertyName9.ts(2,5): error TS2304: Cannot find name 'e'. parserComputedPropertyName9.ts(2,9): error TS2304: Cannot find name 'Type'. -==== parserComputedPropertyName9.ts (3 errors) ==== +==== parserComputedPropertyName9.ts (2 errors) ==== class C { [e]: Type - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'e'. ~~~~ diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName9.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName9.errors.txt.diff deleted file mode 100644 index a3a40d7e51..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName9.errors.txt.diff +++ /dev/null @@ -1,17 +0,0 @@ ---- old.parserComputedPropertyName9.errors.txt -+++ new.parserComputedPropertyName9.errors.txt -@@= skipped -0, +0 lines =@@ -+parserComputedPropertyName9.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - parserComputedPropertyName9.ts(2,5): error TS2304: Cannot find name 'e'. - parserComputedPropertyName9.ts(2,9): error TS2304: Cannot find name 'Type'. - - --==== parserComputedPropertyName9.ts (2 errors) ==== -+==== parserComputedPropertyName9.ts (3 errors) ==== - class C { - [e]: Type -+ ~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~ - !!! error TS2304: Cannot find name 'e'. - ~~~~ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName1.errors.txt b/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName1.errors.txt index 96fd1db346..63fbb6b423 100644 --- a/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName1.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName1.errors.txt @@ -1,12 +1,9 @@ -parserES5ComputedPropertyName1.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserES5ComputedPropertyName1.ts(2,6): error TS2304: Cannot find name 'e'. -==== parserES5ComputedPropertyName1.ts (2 errors) ==== +==== parserES5ComputedPropertyName1.ts (1 errors) ==== declare class C { [e]: number - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'e'. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName1.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName1.errors.txt.diff deleted file mode 100644 index 102fd7704a..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName1.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.parserES5ComputedPropertyName1.errors.txt -+++ new.parserES5ComputedPropertyName1.errors.txt -@@= skipped -0, +0 lines =@@ -+parserES5ComputedPropertyName1.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - parserES5ComputedPropertyName1.ts(2,6): error TS2304: Cannot find name 'e'. - - --==== parserES5ComputedPropertyName1.ts (1 errors) ==== -+==== parserES5ComputedPropertyName1.ts (2 errors) ==== - declare class C { - [e]: number -+ ~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~ - !!! error TS2304: Cannot find name 'e'. - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName10.errors.txt b/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName10.errors.txt index 9f48af31a7..be53362605 100644 --- a/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName10.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName10.errors.txt @@ -1,12 +1,9 @@ -parserES5ComputedPropertyName10.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserES5ComputedPropertyName10.ts(2,5): error TS2304: Cannot find name 'e'. -==== parserES5ComputedPropertyName10.ts (2 errors) ==== +==== parserES5ComputedPropertyName10.ts (1 errors) ==== class C { [e] = 1 - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'e'. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName10.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName10.errors.txt.diff deleted file mode 100644 index 78e1b03165..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName10.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.parserES5ComputedPropertyName10.errors.txt -+++ new.parserES5ComputedPropertyName10.errors.txt -@@= skipped -0, +0 lines =@@ -+parserES5ComputedPropertyName10.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - parserES5ComputedPropertyName10.ts(2,5): error TS2304: Cannot find name 'e'. - - --==== parserES5ComputedPropertyName10.ts (1 errors) ==== -+==== parserES5ComputedPropertyName10.ts (2 errors) ==== - class C { - [e] = 1 -+ ~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~ - !!! error TS2304: Cannot find name 'e'. - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName11.errors.txt b/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName11.errors.txt index 479c01d727..d216c82162 100644 --- a/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName11.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName11.errors.txt @@ -1,12 +1,9 @@ -parserES5ComputedPropertyName11.ts(2,4): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. parserES5ComputedPropertyName11.ts(2,5): error TS2304: Cannot find name 'e'. -==== parserES5ComputedPropertyName11.ts (2 errors) ==== +==== parserES5ComputedPropertyName11.ts (1 errors) ==== class C { [e](); - ~~~ -!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'e'. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName11.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName11.errors.txt.diff deleted file mode 100644 index 9227a82638..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName11.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.parserES5ComputedPropertyName11.errors.txt -+++ new.parserES5ComputedPropertyName11.errors.txt -@@= skipped -0, +0 lines =@@ -+parserES5ComputedPropertyName11.ts(2,4): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - parserES5ComputedPropertyName11.ts(2,5): error TS2304: Cannot find name 'e'. - - --==== parserES5ComputedPropertyName11.ts (1 errors) ==== -+==== parserES5ComputedPropertyName11.ts (2 errors) ==== - class C { - [e](); -+ ~~~ -+!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~ - !!! error TS2304: Cannot find name 'e'. - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName5.errors.txt b/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName5.errors.txt index f9e5ce838b..c54d1e44b5 100644 --- a/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName5.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName5.errors.txt @@ -1,12 +1,9 @@ -parserES5ComputedPropertyName5.ts(2,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. parserES5ComputedPropertyName5.ts(2,6): error TS2304: Cannot find name 'e'. -==== parserES5ComputedPropertyName5.ts (2 errors) ==== +==== parserES5ComputedPropertyName5.ts (1 errors) ==== interface I { [e]: number - ~~~ -!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'e'. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName5.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName5.errors.txt.diff deleted file mode 100644 index bbb48b49ce..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName5.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.parserES5ComputedPropertyName5.errors.txt -+++ new.parserES5ComputedPropertyName5.errors.txt -@@= skipped -0, +0 lines =@@ -+parserES5ComputedPropertyName5.ts(2,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. - parserES5ComputedPropertyName5.ts(2,6): error TS2304: Cannot find name 'e'. - - --==== parserES5ComputedPropertyName5.ts (1 errors) ==== -+==== parserES5ComputedPropertyName5.ts (2 errors) ==== - interface I { - [e]: number -+ ~~~ -+!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~ - !!! error TS2304: Cannot find name 'e'. - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName7.errors.txt b/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName7.errors.txt index 7ef1fabb0c..bffd87321c 100644 --- a/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName7.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName7.errors.txt @@ -1,12 +1,9 @@ -parserES5ComputedPropertyName7.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserES5ComputedPropertyName7.ts(2,5): error TS2304: Cannot find name 'e'. -==== parserES5ComputedPropertyName7.ts (2 errors) ==== +==== parserES5ComputedPropertyName7.ts (1 errors) ==== class C { [e] - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'e'. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName7.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName7.errors.txt.diff deleted file mode 100644 index 8972221880..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName7.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.parserES5ComputedPropertyName7.errors.txt -+++ new.parserES5ComputedPropertyName7.errors.txt -@@= skipped -0, +0 lines =@@ -+parserES5ComputedPropertyName7.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - parserES5ComputedPropertyName7.ts(2,5): error TS2304: Cannot find name 'e'. - - --==== parserES5ComputedPropertyName7.ts (1 errors) ==== -+==== parserES5ComputedPropertyName7.ts (2 errors) ==== - class C { - [e] -+ ~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~ - !!! error TS2304: Cannot find name 'e'. - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName8.errors.txt b/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName8.errors.txt index 4f2851d8e8..2295c143ba 100644 --- a/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName8.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName8.errors.txt @@ -1,10 +1,7 @@ -parserES5ComputedPropertyName8.ts(1,10): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. parserES5ComputedPropertyName8.ts(1,11): error TS2304: Cannot find name 'e'. -==== parserES5ComputedPropertyName8.ts (2 errors) ==== +==== parserES5ComputedPropertyName8.ts (1 errors) ==== var v: { [e]: number }; - ~~~ -!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName8.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName8.errors.txt.diff deleted file mode 100644 index 83f18a0789..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName8.errors.txt.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- old.parserES5ComputedPropertyName8.errors.txt -+++ new.parserES5ComputedPropertyName8.errors.txt -@@= skipped -0, +0 lines =@@ -+parserES5ComputedPropertyName8.ts(1,10): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - parserES5ComputedPropertyName8.ts(1,11): error TS2304: Cannot find name 'e'. - - --==== parserES5ComputedPropertyName8.ts (1 errors) ==== -+==== parserES5ComputedPropertyName8.ts (2 errors) ==== - var v: { [e]: number }; -+ ~~~ -+!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~ - !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName9.errors.txt b/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName9.errors.txt index b5733d2d06..361313645c 100644 --- a/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName9.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName9.errors.txt @@ -1,13 +1,10 @@ -parserES5ComputedPropertyName9.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserES5ComputedPropertyName9.ts(2,5): error TS2304: Cannot find name 'e'. parserES5ComputedPropertyName9.ts(2,9): error TS2304: Cannot find name 'Type'. -==== parserES5ComputedPropertyName9.ts (3 errors) ==== +==== parserES5ComputedPropertyName9.ts (2 errors) ==== class C { [e]: Type - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'e'. ~~~~ diff --git a/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName9.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName9.errors.txt.diff deleted file mode 100644 index ff00be1542..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName9.errors.txt.diff +++ /dev/null @@ -1,17 +0,0 @@ ---- old.parserES5ComputedPropertyName9.errors.txt -+++ new.parserES5ComputedPropertyName9.errors.txt -@@= skipped -0, +0 lines =@@ -+parserES5ComputedPropertyName9.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - parserES5ComputedPropertyName9.ts(2,5): error TS2304: Cannot find name 'e'. - parserES5ComputedPropertyName9.ts(2,9): error TS2304: Cannot find name 'Type'. - - --==== parserES5ComputedPropertyName9.ts (2 errors) ==== -+==== parserES5ComputedPropertyName9.ts (3 errors) ==== - class C { - [e]: Type -+ ~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~ - !!! error TS2304: Cannot find name 'e'. - ~~~~ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty1.errors.txt b/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty1.errors.txt index 97784e12e1..17c9069cbc 100644 --- a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty1.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty1.errors.txt @@ -1,12 +1,9 @@ -parserES5SymbolProperty1.ts(2,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. parserES5SymbolProperty1.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -==== parserES5SymbolProperty1.ts (2 errors) ==== +==== parserES5SymbolProperty1.ts (1 errors) ==== interface I { [Symbol.iterator]: string; - ~~~~~~~~~~~~~~~~~ -!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty1.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty1.errors.txt.diff deleted file mode 100644 index 3654e8f4dc..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty1.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.parserES5SymbolProperty1.errors.txt -+++ new.parserES5SymbolProperty1.errors.txt -@@= skipped -0, +0 lines =@@ -+parserES5SymbolProperty1.ts(2,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. - parserES5SymbolProperty1.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - --==== parserES5SymbolProperty1.ts (1 errors) ==== -+==== parserES5SymbolProperty1.ts (2 errors) ==== - interface I { - [Symbol.iterator]: string; -+ ~~~~~~~~~~~~~~~~~ -+!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~ - !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty2.errors.txt b/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty2.errors.txt index 16fff8a5de..547a3c8f0b 100644 --- a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty2.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty2.errors.txt @@ -1,12 +1,9 @@ -parserES5SymbolProperty2.ts(2,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. parserES5SymbolProperty2.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -==== parserES5SymbolProperty2.ts (2 errors) ==== +==== parserES5SymbolProperty2.ts (1 errors) ==== interface I { [Symbol.unscopables](): string; - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty2.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty2.errors.txt.diff deleted file mode 100644 index 77e966276a..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty2.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.parserES5SymbolProperty2.errors.txt -+++ new.parserES5SymbolProperty2.errors.txt -@@= skipped -0, +0 lines =@@ -+parserES5SymbolProperty2.ts(2,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. - parserES5SymbolProperty2.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - --==== parserES5SymbolProperty2.ts (1 errors) ==== -+==== parserES5SymbolProperty2.ts (2 errors) ==== - interface I { - [Symbol.unscopables](): string; -+ ~~~~~~~~~~~~~~~~~~~~ -+!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~ - !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty3.errors.txt b/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty3.errors.txt index 1dc3539859..36a420d067 100644 --- a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty3.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty3.errors.txt @@ -1,12 +1,9 @@ -parserES5SymbolProperty3.ts(2,5): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. parserES5SymbolProperty3.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -==== parserES5SymbolProperty3.ts (2 errors) ==== +==== parserES5SymbolProperty3.ts (1 errors) ==== declare class C { [Symbol.unscopables](): string; - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty3.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty3.errors.txt.diff deleted file mode 100644 index 0952e75356..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty3.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.parserES5SymbolProperty3.errors.txt -+++ new.parserES5SymbolProperty3.errors.txt -@@= skipped -0, +0 lines =@@ -+parserES5SymbolProperty3.ts(2,5): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. - parserES5SymbolProperty3.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - --==== parserES5SymbolProperty3.ts (1 errors) ==== -+==== parserES5SymbolProperty3.ts (2 errors) ==== - declare class C { - [Symbol.unscopables](): string; -+ ~~~~~~~~~~~~~~~~~~~~ -+!!! error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~ - !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty4.errors.txt b/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty4.errors.txt index 733aea6dec..d2dbaed576 100644 --- a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty4.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty4.errors.txt @@ -1,12 +1,9 @@ -parserES5SymbolProperty4.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserES5SymbolProperty4.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -==== parserES5SymbolProperty4.ts (2 errors) ==== +==== parserES5SymbolProperty4.ts (1 errors) ==== declare class C { [Symbol.isRegExp]: string; - ~~~~~~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty4.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty4.errors.txt.diff deleted file mode 100644 index f71fd49762..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty4.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.parserES5SymbolProperty4.errors.txt -+++ new.parserES5SymbolProperty4.errors.txt -@@= skipped -0, +0 lines =@@ -+parserES5SymbolProperty4.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - parserES5SymbolProperty4.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - --==== parserES5SymbolProperty4.ts (1 errors) ==== -+==== parserES5SymbolProperty4.ts (2 errors) ==== - declare class C { - [Symbol.isRegExp]: string; -+ ~~~~~~~~~~~~~~~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~ - !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty5.errors.txt b/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty5.errors.txt index c1c4d7fb49..cc04ef7048 100644 --- a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty5.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty5.errors.txt @@ -1,12 +1,9 @@ -parserES5SymbolProperty5.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserES5SymbolProperty5.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -==== parserES5SymbolProperty5.ts (2 errors) ==== +==== parserES5SymbolProperty5.ts (1 errors) ==== class C { [Symbol.isRegExp]: string; - ~~~~~~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty5.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty5.errors.txt.diff deleted file mode 100644 index c1bb0fdecd..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty5.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.parserES5SymbolProperty5.errors.txt -+++ new.parserES5SymbolProperty5.errors.txt -@@= skipped -0, +0 lines =@@ -+parserES5SymbolProperty5.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - parserES5SymbolProperty5.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - --==== parserES5SymbolProperty5.ts (1 errors) ==== -+==== parserES5SymbolProperty5.ts (2 errors) ==== - class C { - [Symbol.isRegExp]: string; -+ ~~~~~~~~~~~~~~~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~ - !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty6.errors.txt b/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty6.errors.txt index 8b37ebc18a..8bd6ad8e5f 100644 --- a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty6.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty6.errors.txt @@ -1,12 +1,9 @@ -parserES5SymbolProperty6.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserES5SymbolProperty6.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -==== parserES5SymbolProperty6.ts (2 errors) ==== +==== parserES5SymbolProperty6.ts (1 errors) ==== class C { [Symbol.toStringTag]: string = ""; - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty6.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty6.errors.txt.diff deleted file mode 100644 index 2263877ee4..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty6.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.parserES5SymbolProperty6.errors.txt -+++ new.parserES5SymbolProperty6.errors.txt -@@= skipped -0, +0 lines =@@ -+parserES5SymbolProperty6.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - parserES5SymbolProperty6.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - --==== parserES5SymbolProperty6.ts (1 errors) ==== -+==== parserES5SymbolProperty6.ts (2 errors) ==== - class C { - [Symbol.toStringTag]: string = ""; -+ ~~~~~~~~~~~~~~~~~~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~ - !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty8.errors.txt b/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty8.errors.txt index a1fd554227..fbab2b7b28 100644 --- a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty8.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty8.errors.txt @@ -1,12 +1,9 @@ -parserES5SymbolProperty8.ts(2,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. parserES5SymbolProperty8.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -==== parserES5SymbolProperty8.ts (2 errors) ==== +==== parserES5SymbolProperty8.ts (1 errors) ==== var x: { [Symbol.toPrimitive](): string - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty8.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty8.errors.txt.diff deleted file mode 100644 index 280335bd64..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty8.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.parserES5SymbolProperty8.errors.txt -+++ new.parserES5SymbolProperty8.errors.txt -@@= skipped -0, +0 lines =@@ -+parserES5SymbolProperty8.ts(2,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - parserES5SymbolProperty8.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - --==== parserES5SymbolProperty8.ts (1 errors) ==== -+==== parserES5SymbolProperty8.ts (2 errors) ==== - var x: { - [Symbol.toPrimitive](): string -+ ~~~~~~~~~~~~~~~~~~~~ -+!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~ - !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty9.errors.txt b/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty9.errors.txt index 680c9da381..ee9a898bef 100644 --- a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty9.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty9.errors.txt @@ -1,12 +1,9 @@ -parserES5SymbolProperty9.ts(2,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. parserES5SymbolProperty9.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -==== parserES5SymbolProperty9.ts (2 errors) ==== +==== parserES5SymbolProperty9.ts (1 errors) ==== var x: { [Symbol.toPrimitive]: string - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty9.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty9.errors.txt.diff deleted file mode 100644 index fe1407171e..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty9.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.parserES5SymbolProperty9.errors.txt -+++ new.parserES5SymbolProperty9.errors.txt -@@= skipped -0, +0 lines =@@ -+parserES5SymbolProperty9.ts(2,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - parserES5SymbolProperty9.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - --==== parserES5SymbolProperty9.ts (1 errors) ==== -+==== parserES5SymbolProperty9.ts (2 errors) ==== - var x: { - [Symbol.toPrimitive]: string -+ ~~~~~~~~~~~~~~~~~~~~ -+!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~ - !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserIndexSignature11.errors.txt b/testdata/baselines/reference/submodule/conformance/parserIndexSignature11.errors.txt index 8a129399db..3e95b90671 100644 --- a/testdata/baselines/reference/submodule/conformance/parserIndexSignature11.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserIndexSignature11.errors.txt @@ -1,14 +1,11 @@ -parserIndexSignature11.ts(2,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. parserIndexSignature11.ts(2,10): error TS2304: Cannot find name 'p'. parserIndexSignature11.ts(3,9): error TS1021: An index signature must have a type annotation. parserIndexSignature11.ts(4,10): error TS1096: An index signature must have exactly one parameter. -==== parserIndexSignature11.ts (4 errors) ==== +==== parserIndexSignature11.ts (3 errors) ==== interface I { [p]; // Used to be indexer, now it is a computed property - ~~~ -!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'p'. [p1: string]; diff --git a/testdata/baselines/reference/submodule/conformance/parserIndexSignature11.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserIndexSignature11.errors.txt.diff deleted file mode 100644 index 6a030b74fc..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserIndexSignature11.errors.txt.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- old.parserIndexSignature11.errors.txt -+++ new.parserIndexSignature11.errors.txt -@@= skipped -0, +0 lines =@@ -+parserIndexSignature11.ts(2,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. - parserIndexSignature11.ts(2,10): error TS2304: Cannot find name 'p'. - parserIndexSignature11.ts(3,9): error TS1021: An index signature must have a type annotation. - parserIndexSignature11.ts(4,10): error TS1096: An index signature must have exactly one parameter. - - --==== parserIndexSignature11.ts (3 errors) ==== -+==== parserIndexSignature11.ts (4 errors) ==== - interface I { - [p]; // Used to be indexer, now it is a computed property -+ ~~~ -+!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~ - !!! error TS2304: Cannot find name 'p'. - [p1: string]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserIndexSignature5.errors.txt b/testdata/baselines/reference/submodule/conformance/parserIndexSignature5.errors.txt index 9ce3a68de6..9648dfc73e 100644 --- a/testdata/baselines/reference/submodule/conformance/parserIndexSignature5.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserIndexSignature5.errors.txt @@ -1,12 +1,9 @@ -parserIndexSignature5.ts(2,3): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. parserIndexSignature5.ts(2,4): error TS2304: Cannot find name 'a'. -==== parserIndexSignature5.ts (2 errors) ==== +==== parserIndexSignature5.ts (1 errors) ==== interface I { [a] // Used to be indexer, now it is a computed property - ~~~ -!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'a'. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserIndexSignature5.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserIndexSignature5.errors.txt.diff deleted file mode 100644 index ca0f74e439..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserIndexSignature5.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.parserIndexSignature5.errors.txt -+++ new.parserIndexSignature5.errors.txt -@@= skipped -0, +0 lines =@@ -+parserIndexSignature5.ts(2,3): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. - parserIndexSignature5.ts(2,4): error TS2304: Cannot find name 'a'. - - --==== parserIndexSignature5.ts (1 errors) ==== -+==== parserIndexSignature5.ts (2 errors) ==== - interface I { - [a] // Used to be indexer, now it is a computed property -+ ~~~ -+!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~ - !!! error TS2304: Cannot find name 'a'. - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/symbolProperty59.errors.txt b/testdata/baselines/reference/submodule/conformance/symbolProperty59.errors.txt index 8886ebb736..fae26a075e 100644 --- a/testdata/baselines/reference/submodule/conformance/symbolProperty59.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/symbolProperty59.errors.txt @@ -1,12 +1,9 @@ -symbolProperty59.ts(2,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. symbolProperty59.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -==== symbolProperty59.ts (2 errors) ==== +==== symbolProperty59.ts (1 errors) ==== interface I { [Symbol.keyFor]: string; ~~~~~~~~~~~~~~~ -!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/symbolProperty59.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/symbolProperty59.errors.txt.diff deleted file mode 100644 index 8cf83dc1cd..0000000000 --- a/testdata/baselines/reference/submodule/conformance/symbolProperty59.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.symbolProperty59.errors.txt -+++ new.symbolProperty59.errors.txt -@@= skipped -0, +0 lines =@@ -+symbolProperty59.ts(2,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. - symbolProperty59.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - - --==== symbolProperty59.ts (1 errors) ==== -+==== symbolProperty59.ts (2 errors) ==== - interface I { - [Symbol.keyFor]: string; -+ ~~~~~~~~~~~~~~~ -+!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~~~~~~~~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/symbolProperty61.errors.txt b/testdata/baselines/reference/submodule/conformance/symbolProperty61.errors.txt deleted file mode 100644 index 09770ae96c..0000000000 --- a/testdata/baselines/reference/submodule/conformance/symbolProperty61.errors.txt +++ /dev/null @@ -1,36 +0,0 @@ -symbolProperty61.ts(22,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - - -==== symbolProperty61.ts (1 errors) ==== - declare global { - interface SymbolConstructor { - readonly obs: symbol - } - } - - const observable: typeof Symbol.obs = Symbol.obs - - export class MyObservable { - constructor(private _val: T) {} - - subscribe(next: (val: T) => void) { - next(this._val) - } - - [observable]() { - return this - } - } - - type InteropObservable = { - [Symbol.obs]: () => { subscribe(next: (val: T) => void): void } - ~~~~~~~~~~~~ -!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - } - - function from(obs: InteropObservable) { - return obs[Symbol.obs]() - } - - from(new MyObservable(42)) - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/symbolProperty61.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/symbolProperty61.errors.txt.diff deleted file mode 100644 index b800f0a11d..0000000000 --- a/testdata/baselines/reference/submodule/conformance/symbolProperty61.errors.txt.diff +++ /dev/null @@ -1,40 +0,0 @@ ---- old.symbolProperty61.errors.txt -+++ new.symbolProperty61.errors.txt -@@= skipped -0, +0 lines =@@ -- -+symbolProperty61.ts(22,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. -+ -+ -+==== symbolProperty61.ts (1 errors) ==== -+ declare global { -+ interface SymbolConstructor { -+ readonly obs: symbol -+ } -+ } -+ -+ const observable: typeof Symbol.obs = Symbol.obs -+ -+ export class MyObservable { -+ constructor(private _val: T) {} -+ -+ subscribe(next: (val: T) => void) { -+ next(this._val) -+ } -+ -+ [observable]() { -+ return this -+ } -+ } -+ -+ type InteropObservable = { -+ [Symbol.obs]: () => { subscribe(next: (val: T) => void): void } -+ ~~~~~~~~~~~~ -+!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. -+ } -+ -+ function from(obs: InteropObservable) { -+ return obs[Symbol.obs]() -+ } -+ -+ from(new MyObservable(42)) -+ \ No newline at end of file