Hi, what are the best practices for writing a library in typescript that is then consumed by another typescript library? Is it really to manually ///<reference> the output file?
@CannibalVox No just use commonjs with declaration true. A quickstart : http://basarat.gitbooks.io/typescript/content/docs/node/nodejs.html
Also is there any way to not compile to a single file but have the compiled output not be mixed in with the source?
You can use outDir
. But I recommend against that as it becomes fairly weird ... fairly quickly
.ts
in child
interface URL {
createObjectURL(object: any, options?: ObjectURLOptions): string;
revokeObjectURL(url: string): void;
}
declare var URL: URL;
URL
is defined this way. Anyone else?