mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
26 lines
445 B
TypeScript
26 lines
445 B
TypeScript
//// [tests/cases/conformance/expressions/asOperator/asOperatorASI.ts] ////
|
|
|
|
//// [asOperatorASI.ts]
|
|
class Foo { }
|
|
declare function as(...args: any[]);
|
|
|
|
// Example 1
|
|
var x = 10
|
|
as `Hello world`; // should not error
|
|
|
|
// Example 2
|
|
var y = 20
|
|
as(Foo); // should emit
|
|
|
|
|
|
//// [asOperatorASI.js]
|
|
"use strict";
|
|
class Foo {
|
|
}
|
|
// Example 1
|
|
var x = 10;
|
|
as `Hello world`; // should not error
|
|
// Example 2
|
|
var y = 20;
|
|
as(Foo); // should emit
|