Answers for "run a typescript file directly"

6

how to run typescript file

npx ts-node src/foo.ts
Posted by: Guest on June-22-2020
1

import js file in typescript

// Add to tsconfig.json:
{
  "compilerOptions": {
      ...
      "allowJs": true
      ...
  }
}
  
import MyModule from './../pages/MyModule';
Posted by: Guest on April-27-2021

Code answers related to "run a typescript file directly"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language