TeaWeb/tools/dtsgen/test_non_modular/test_01.ts

47 lines
677 B
TypeScript
Raw Normal View History

2018-12-04 18:48:05 +01:00
function test() : string {
return "IDK!";
}
class C {
}
function test2() : C {
return undefined;
}
2018-12-04 19:02:45 +01:00
// @ts-ignore
2018-12-04 18:48:05 +01:00
function test4() : D {
return undefined;
}
namespace T {
function C() {
}
export function D() {
}
}
namespace T {
namespace Y {
function T() {}
export function Y() {}
}
}
namespace T {
export async function async_void() {}
export async function async_any() : Promise<any> {
return "" as any;
}
export async function async_number() : Promise<number> {
return 0;
}
export async function async_number_string() : Promise<number | string> {
return 0;
}
2018-12-04 18:48:05 +01:00
}