typescript import code example
Example 1: typescript export import in the same time
// ./User.ts
...
export default a
export default b
// modules-hub.ts
export * from './User.ts'
export * from './Shop.ts'
// Usage
import { a, b } from '../modules-hub.ts'
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
}