import as typescript code example
Example 1: import on save typescript
//Add missing imports on save TypeScript (vscode)
//Add in settings.json:
"editor.codeActionsOnSave": [
"source.addMissingImports",
],
Example 2: import js file in typescript
// Add to tsconfig.json:
{
"compilerOptions": {
...
"allowJs": true
...
}
}
import MyModule from './../pages/MyModule';
Example 3: export interface typescript
interface Props {}
export interface IRefered {
name: string
}