import-typescript Import Typescript on the fly. Install npm install import-typescript Usage const importTs = require("import-typescript")const foo = importTs("./foo.ts") foo() API importTypescript(moduleId, options?) moduleId Type: string The module id. options Type: object cache Type: boolean Default: true Whether to cache the transpiled code.