Files
tsgo/testdata/baselines/reference/submodule/compiler/declFileEmitDeclarationOnly.js

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;
}