mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
29 lines
442 B
TypeScript
29 lines
442 B
TypeScript
//// [tests/cases/compiler/declFileEmitDeclarationOnly.ts] ////
|
|
|
|
//// [helloworld.ts]
|
|
const Log = {
|
|
info(msg: string) {}
|
|
}
|
|
|
|
class HelloWorld {
|
|
constructor(private name: string) {
|
|
}
|
|
|
|
public hello() {
|
|
Log.info(`Hello ${this.name}`);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
//// [helloworld.d.ts]
|
|
declare const Log: {
|
|
info(msg: string): void;
|
|
};
|
|
declare class HelloWorld {
|
|
private name;
|
|
constructor(name: string);
|
|
hello(): void;
|
|
}
|