27 lines
No EOL
1.3 KiB
Text
27 lines
No EOL
1.3 KiB
Text
tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution2.ts(8,14): error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher.
|
|
tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution2.ts(17,14): error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher.
|
|
|
|
|
|
==== tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution2.ts (2 errors) ====
|
|
|
|
function foo1(strs: TemplateStringsArray, x: number): string;
|
|
function foo1(strs: string[], x: number): number;
|
|
function foo1(...stuff: any[]): any {
|
|
return undefined;
|
|
}
|
|
|
|
var a = foo1 `${1}`; // string
|
|
~~~
|
|
!!! error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher.
|
|
var b = foo1([], 1); // number
|
|
|
|
function foo2(strs: string[], x: number): number;
|
|
function foo2(strs: TemplateStringsArray, x: number): string;
|
|
function foo2(...stuff: any[]): any {
|
|
return undefined;
|
|
}
|
|
|
|
var c = foo2 `${1}`; // number
|
|
~~~
|
|
!!! error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher.
|
|
var d = foo2([], 1); // number |