63 lines
1.5 KiB
Text
63 lines
1.5 KiB
Text
=== tests/cases/conformance/expressions/asOperator/asOperator3.ts ===
|
|
declare function tag(...x: any[]): any;
|
|
>tag : (...x: any[]) => any
|
|
>x : any[]
|
|
|
|
var a = `${123 + 456 as number}`;
|
|
>a : string
|
|
>`${123 + 456 as number}` : string
|
|
>123 + 456 as number : number
|
|
>123 + 456 : number
|
|
>123 : number
|
|
>456 : number
|
|
|
|
var b = `leading ${123 + 456 as number}`;
|
|
>b : string
|
|
>`leading ${123 + 456 as number}` : string
|
|
>123 + 456 as number : number
|
|
>123 + 456 : number
|
|
>123 : number
|
|
>456 : number
|
|
|
|
var c = `${123 + 456 as number} trailing`;
|
|
>c : string
|
|
>`${123 + 456 as number} trailing` : string
|
|
>123 + 456 as number : number
|
|
>123 + 456 : number
|
|
>123 : number
|
|
>456 : number
|
|
|
|
var d = `Hello ${123} World` as string;
|
|
>d : string
|
|
>`Hello ${123} World` as string : string
|
|
>`Hello ${123} World` : string
|
|
>123 : number
|
|
|
|
var e = `Hello` as string;
|
|
>e : string
|
|
>`Hello` as string : string
|
|
>`Hello` : string
|
|
|
|
var f = 1 + `${1} end of string` as string;
|
|
>f : string
|
|
>1 + `${1} end of string` as string : string
|
|
>1 + `${1} end of string` : string
|
|
>1 : number
|
|
>`${1} end of string` : string
|
|
>1 : number
|
|
|
|
var g = tag `Hello ${123} World` as string;
|
|
>g : string
|
|
>tag `Hello ${123} World` as string : string
|
|
>tag `Hello ${123} World` : any
|
|
>tag : (...x: any[]) => any
|
|
>`Hello ${123} World` : string
|
|
>123 : number
|
|
|
|
var h = tag `Hello` as string;
|
|
>h : string
|
|
>tag `Hello` as string : string
|
|
>tag `Hello` : any
|
|
>tag : (...x: any[]) => any
|
|
>`Hello` : string
|
|
|