23 lines
646 B
Text
23 lines
646 B
Text
=== tests/cases/conformance/expressions/asOperator/asOperatorASI.ts ===
|
|
class Foo { }
|
|
>Foo : Symbol(Foo, Decl(asOperatorASI.ts, 0, 0))
|
|
|
|
declare function as(...args: any[]);
|
|
>as : Symbol(as, Decl(asOperatorASI.ts, 0, 13))
|
|
>args : Symbol(args, Decl(asOperatorASI.ts, 1, 20))
|
|
|
|
// Example 1
|
|
var x = 10
|
|
>x : Symbol(x, Decl(asOperatorASI.ts, 4, 3))
|
|
|
|
as `Hello world`; // should not error
|
|
>as : Symbol(as, Decl(asOperatorASI.ts, 0, 13))
|
|
|
|
// Example 2
|
|
var y = 20
|
|
>y : Symbol(y, Decl(asOperatorASI.ts, 8, 3))
|
|
|
|
as(Foo); // should emit
|
|
>as : Symbol(as, Decl(asOperatorASI.ts, 0, 13))
|
|
>Foo : Symbol(Foo, Decl(asOperatorASI.ts, 0, 0))
|
|
|