diff --git a/tests/baselines/reference/accessorWithoutBody1.errors.txt b/tests/baselines/reference/accessorWithoutBody1.errors.txt new file mode 100644 index 00000000000..3d074abf254 --- /dev/null +++ b/tests/baselines/reference/accessorWithoutBody1.errors.txt @@ -0,0 +1,7 @@ +tests/cases/compiler/accessorWithoutBody1.ts(1,19): error TS1005: '{' expected. + + +==== tests/cases/compiler/accessorWithoutBody1.ts (1 errors) ==== + var v = { get foo() } + ~ +!!! error TS1005: '{' expected. \ No newline at end of file diff --git a/tests/baselines/reference/accessorWithoutBody2.errors.txt b/tests/baselines/reference/accessorWithoutBody2.errors.txt new file mode 100644 index 00000000000..41bec939045 --- /dev/null +++ b/tests/baselines/reference/accessorWithoutBody2.errors.txt @@ -0,0 +1,7 @@ +tests/cases/compiler/accessorWithoutBody2.ts(1,20): error TS1005: '{' expected. + + +==== tests/cases/compiler/accessorWithoutBody2.ts (1 errors) ==== + var v = { set foo(a) } + ~ +!!! error TS1005: '{' expected. \ No newline at end of file diff --git a/tests/baselines/reference/callExpressionWithMissingTypeArgument1.errors.txt b/tests/baselines/reference/callExpressionWithMissingTypeArgument1.errors.txt new file mode 100644 index 00000000000..7d91abeaa6a --- /dev/null +++ b/tests/baselines/reference/callExpressionWithMissingTypeArgument1.errors.txt @@ -0,0 +1,10 @@ +tests/cases/compiler/callExpressionWithMissingTypeArgument1.ts(1,7): error TS1110: Type expected. +tests/cases/compiler/callExpressionWithMissingTypeArgument1.ts(1,1): error TS2304: Cannot find name 'Foo'. + + +==== tests/cases/compiler/callExpressionWithMissingTypeArgument1.ts (2 errors) ==== + Foo(); + +!!! error TS1110: Type expected. + ~~~ +!!! error TS2304: Cannot find name 'Foo'. \ No newline at end of file diff --git a/tests/baselines/reference/declareModifierOnImport1.errors.txt b/tests/baselines/reference/declareModifierOnImport1.errors.txt new file mode 100644 index 00000000000..e78b4973aa1 --- /dev/null +++ b/tests/baselines/reference/declareModifierOnImport1.errors.txt @@ -0,0 +1,10 @@ +tests/cases/compiler/declareModifierOnImport1.ts(1,1): error TS1079: A 'declare' modifier cannot be used with an import declaration. +tests/cases/compiler/declareModifierOnImport1.ts(1,1): error TS2304: Cannot find name 'b'. + + +==== tests/cases/compiler/declareModifierOnImport1.ts (2 errors) ==== + declare import a = b; + ~~~~~~~ +!!! error TS1079: A 'declare' modifier cannot be used with an import declaration. + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'b'. \ No newline at end of file diff --git a/tests/baselines/reference/indexSignatureWithInitializer1.errors.txt b/tests/baselines/reference/indexSignatureWithInitializer1.errors.txt new file mode 100644 index 00000000000..899cbd5dda0 --- /dev/null +++ b/tests/baselines/reference/indexSignatureWithInitializer1.errors.txt @@ -0,0 +1,12 @@ +tests/cases/compiler/indexSignatureWithInitializer1.ts(2,4): error TS1020: An index signature parameter cannot have an initializer. +tests/cases/compiler/indexSignatureWithInitializer1.ts(2,4): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. + + +==== tests/cases/compiler/indexSignatureWithInitializer1.ts (2 errors) ==== + class C { + [a: number = 1]: number; + ~ +!!! error TS1020: An index signature parameter cannot have an initializer. + ~~~~~~~~~~~~~ +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. + } \ No newline at end of file diff --git a/tests/baselines/reference/indexSignatureWithoutTypeAnnotation1..js b/tests/baselines/reference/indexSignatureWithoutTypeAnnotation1..js new file mode 100644 index 00000000000..e500cfc221b --- /dev/null +++ b/tests/baselines/reference/indexSignatureWithoutTypeAnnotation1..js @@ -0,0 +1,4 @@ +//// [indexSignatureWithoutTypeAnnotation1..ts] + + +//// [indexSignatureWithoutTypeAnnotation1..js] diff --git a/tests/baselines/reference/indexSignatureWithoutTypeAnnotation1..types b/tests/baselines/reference/indexSignatureWithoutTypeAnnotation1..types new file mode 100644 index 00000000000..7ab1bd72cd7 --- /dev/null +++ b/tests/baselines/reference/indexSignatureWithoutTypeAnnotation1..types @@ -0,0 +1,3 @@ +=== tests/cases/compiler/indexSignatureWithoutTypeAnnotation1..ts === + +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/indexSignatureWithoutTypeAnnotation1.errors.txt b/tests/baselines/reference/indexSignatureWithoutTypeAnnotation1.errors.txt new file mode 100644 index 00000000000..5562005a0b6 --- /dev/null +++ b/tests/baselines/reference/indexSignatureWithoutTypeAnnotation1.errors.txt @@ -0,0 +1,9 @@ +tests/cases/compiler/indexSignatureWithoutTypeAnnotation1.ts(2,3): error TS1021: An index signature must have a type annotation. + + +==== tests/cases/compiler/indexSignatureWithoutTypeAnnotation1.ts (1 errors) ==== + class C { + [a: number]; + ~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + } \ No newline at end of file diff --git a/tests/baselines/reference/modifierOnParameter1.errors.txt b/tests/baselines/reference/modifierOnParameter1.errors.txt new file mode 100644 index 00000000000..72ec2aab93a --- /dev/null +++ b/tests/baselines/reference/modifierOnParameter1.errors.txt @@ -0,0 +1,9 @@ +tests/cases/compiler/modifierOnParameter1.ts(2,16): error TS1090: 'declare' modifier cannot appear on a parameter. + + +==== tests/cases/compiler/modifierOnParameter1.ts (1 errors) ==== + class C { + constructor(declare p) { } + ~~~~~~~ +!!! error TS1090: 'declare' modifier cannot appear on a parameter. + } \ No newline at end of file diff --git a/tests/baselines/reference/throwWithoutNewLine1.errors.txt b/tests/baselines/reference/throwWithoutNewLine1.errors.txt new file mode 100644 index 00000000000..6cc1c8f6fce --- /dev/null +++ b/tests/baselines/reference/throwWithoutNewLine1.errors.txt @@ -0,0 +1,7 @@ +tests/cases/compiler/throwWithoutNewLine1.ts(1,6): error TS1109: Expression expected. + + +==== tests/cases/compiler/throwWithoutNewLine1.ts (1 errors) ==== + throw + +!!! error TS1109: Expression expected. \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterListWithTrailingComma1.js b/tests/baselines/reference/typeParameterListWithTrailingComma1.js new file mode 100644 index 00000000000..3891310fcb4 --- /dev/null +++ b/tests/baselines/reference/typeParameterListWithTrailingComma1.js @@ -0,0 +1,10 @@ +//// [typeParameterListWithTrailingComma1.ts] +class C { +} + +//// [typeParameterListWithTrailingComma1.js] +var C = (function () { + function C() { + } + return C; +})(); diff --git a/tests/baselines/reference/typeParameterListWithTrailingComma1.types b/tests/baselines/reference/typeParameterListWithTrailingComma1.types new file mode 100644 index 00000000000..9c68a7ac300 --- /dev/null +++ b/tests/baselines/reference/typeParameterListWithTrailingComma1.types @@ -0,0 +1,5 @@ +=== tests/cases/compiler/typeParameterListWithTrailingComma1.ts === +class C { +>C : C +>T : T +} diff --git a/tests/baselines/reference/variableDeclarationInStrictMode1.errors.txt b/tests/baselines/reference/variableDeclarationInStrictMode1.errors.txt new file mode 100644 index 00000000000..aa2ccdbed9f --- /dev/null +++ b/tests/baselines/reference/variableDeclarationInStrictMode1.errors.txt @@ -0,0 +1,12 @@ +tests/cases/compiler/variableDeclarationInStrictMode1.ts(2,5): error TS1100: Invalid use of 'eval' in strict mode. +lib.d.ts(29,18): error TS2300: Duplicate identifier 'eval'. +tests/cases/compiler/variableDeclarationInStrictMode1.ts(2,5): error TS2300: Duplicate identifier 'eval'. + + +==== tests/cases/compiler/variableDeclarationInStrictMode1.ts (2 errors) ==== + "use strict"; + var eval; + ~~~~ +!!! error TS1100: Invalid use of 'eval' in strict mode. + ~~~~ +!!! error TS2300: Duplicate identifier 'eval'. \ No newline at end of file diff --git a/tests/baselines/reference/yieldExpression1.errors.txt b/tests/baselines/reference/yieldExpression1.errors.txt new file mode 100644 index 00000000000..ecac77698c5 --- /dev/null +++ b/tests/baselines/reference/yieldExpression1.errors.txt @@ -0,0 +1,9 @@ +tests/cases/compiler/yieldExpression1.ts(1,9): error TS9001: 'generators' are not currently supported. + + +==== tests/cases/compiler/yieldExpression1.ts (1 errors) ==== + function* foo() { + ~ +!!! error TS9001: 'generators' are not currently supported. + yield + } \ No newline at end of file diff --git a/tests/cases/compiler/accessorWithoutBody1.ts b/tests/cases/compiler/accessorWithoutBody1.ts new file mode 100644 index 00000000000..2cf246affba --- /dev/null +++ b/tests/cases/compiler/accessorWithoutBody1.ts @@ -0,0 +1,2 @@ +// @target: ES5 +var v = { get foo() } \ No newline at end of file diff --git a/tests/cases/compiler/accessorWithoutBody2.ts b/tests/cases/compiler/accessorWithoutBody2.ts new file mode 100644 index 00000000000..11ece4b4d96 --- /dev/null +++ b/tests/cases/compiler/accessorWithoutBody2.ts @@ -0,0 +1,2 @@ +// @target: ES5 +var v = { set foo(a) } \ No newline at end of file diff --git a/tests/cases/compiler/callExpressionWithMissingTypeArgument1.ts b/tests/cases/compiler/callExpressionWithMissingTypeArgument1.ts new file mode 100644 index 00000000000..ea118fc4d4c --- /dev/null +++ b/tests/cases/compiler/callExpressionWithMissingTypeArgument1.ts @@ -0,0 +1 @@ +Foo(); \ No newline at end of file diff --git a/tests/cases/compiler/declareModifierOnImport1.ts b/tests/cases/compiler/declareModifierOnImport1.ts new file mode 100644 index 00000000000..8ccd1924790 --- /dev/null +++ b/tests/cases/compiler/declareModifierOnImport1.ts @@ -0,0 +1 @@ +declare import a = b; \ No newline at end of file diff --git a/tests/cases/compiler/indexSignatureWithInitializer1.ts b/tests/cases/compiler/indexSignatureWithInitializer1.ts new file mode 100644 index 00000000000..d60fb81f0a4 --- /dev/null +++ b/tests/cases/compiler/indexSignatureWithInitializer1.ts @@ -0,0 +1,3 @@ +class C { + [a: number = 1]: number; +} \ No newline at end of file diff --git a/tests/cases/compiler/indexSignatureWithoutTypeAnnotation1..ts b/tests/cases/compiler/indexSignatureWithoutTypeAnnotation1..ts new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/cases/compiler/indexSignatureWithoutTypeAnnotation1.ts b/tests/cases/compiler/indexSignatureWithoutTypeAnnotation1.ts new file mode 100644 index 00000000000..0bd92d44162 --- /dev/null +++ b/tests/cases/compiler/indexSignatureWithoutTypeAnnotation1.ts @@ -0,0 +1,3 @@ +class C { + [a: number]; +} \ No newline at end of file diff --git a/tests/cases/compiler/modifierOnParameter1.ts b/tests/cases/compiler/modifierOnParameter1.ts new file mode 100644 index 00000000000..931911af9b4 --- /dev/null +++ b/tests/cases/compiler/modifierOnParameter1.ts @@ -0,0 +1,3 @@ +class C { + constructor(declare p) { } +} \ No newline at end of file diff --git a/tests/cases/compiler/throwWithoutNewLine1.ts b/tests/cases/compiler/throwWithoutNewLine1.ts new file mode 100644 index 00000000000..755c8ff3842 --- /dev/null +++ b/tests/cases/compiler/throwWithoutNewLine1.ts @@ -0,0 +1 @@ +throw \ No newline at end of file diff --git a/tests/cases/compiler/typeParameterListWithTrailingComma1.ts b/tests/cases/compiler/typeParameterListWithTrailingComma1.ts new file mode 100644 index 00000000000..68a11982cbe --- /dev/null +++ b/tests/cases/compiler/typeParameterListWithTrailingComma1.ts @@ -0,0 +1,2 @@ +class C { +} \ No newline at end of file diff --git a/tests/cases/compiler/variableDeclarationInStrictMode1.ts b/tests/cases/compiler/variableDeclarationInStrictMode1.ts new file mode 100644 index 00000000000..266e5af44ae --- /dev/null +++ b/tests/cases/compiler/variableDeclarationInStrictMode1.ts @@ -0,0 +1,2 @@ +"use strict"; +var eval; \ No newline at end of file diff --git a/tests/cases/compiler/yieldExpression1.ts b/tests/cases/compiler/yieldExpression1.ts new file mode 100644 index 00000000000..15c950f724f --- /dev/null +++ b/tests/cases/compiler/yieldExpression1.ts @@ -0,0 +1,3 @@ +function* foo() { + yield +} \ No newline at end of file