Answers for "typescript types in other files"

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
0

typescript different types support

function getLength(obj: string | string[]) {
  return obj.length;
}
Posted by: Guest on March-18-2022

Code answers related to "typescript types in other files"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language