Inlining Modules In Typescript

Viewed 1009

I would like to use modules in TypeScript for inlining purposes. For example, if I have this code in mymodule.ts:

export class mymodule {
    constructor() {
        console.log('Hi');
    }
}

When I include this class in another file with:

import { mymodule } from './mymodule.ts'

I would like to have the mymodule class copy-and-pasted or inlined to compiled file. I am using outFile option to compile to single file but it just creates multiple modules in one file, generating unnecessary wrapper codes. Is there a way to accomplish this?

Thanks.

2 Answers
Related