This was we don't get noisy baselines just because a different phase of the compiler reported the diagnostic. This helps with Yui's refactoring work to move grammar checks into the type checker.
25 lines
No EOL
1.3 KiB
Text
25 lines
No EOL
1.3 KiB
Text
lib.d.ts(515,11): error TS2300: Duplicate identifier 'TemplateStringsArray'.
|
|
tests/cases/compiler/templateStringsArrayTypeDefinedInES5Mode.ts(2,7): error TS2300: Duplicate identifier 'TemplateStringsArray'.
|
|
tests/cases/compiler/templateStringsArrayTypeDefinedInES5Mode.ts(8,3): error TS2345: Argument of type '{ [x: number]: undefined; }' is not assignable to parameter of type 'TemplateStringsArray'.
|
|
Property 'raw' is missing in type '{ [x: number]: undefined; }'.
|
|
tests/cases/compiler/templateStringsArrayTypeDefinedInES5Mode.ts(10,3): error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher.
|
|
|
|
|
|
==== tests/cases/compiler/templateStringsArrayTypeDefinedInES5Mode.ts (3 errors) ====
|
|
|
|
class TemplateStringsArray {
|
|
~~~~~~~~~~~~~~~~~~~~
|
|
!!! error TS2300: Duplicate identifier 'TemplateStringsArray'.
|
|
}
|
|
|
|
function f(x: TemplateStringsArray, y: number, z: number) {
|
|
}
|
|
|
|
f({}, 10, 10);
|
|
~~
|
|
!!! error TS2345: Argument of type '{ [x: number]: undefined; }' is not assignable to parameter of type 'TemplateStringsArray'.
|
|
!!! error TS2345: Property 'raw' is missing in type '{ [x: number]: undefined; }'.
|
|
|
|
f `abcdef${ 1234 }${ 5678 }ghijkl`;
|
|
~~~~~~~~~
|
|
!!! error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. |