LoginSignup
0
1

More than 5 years have passed since last update.

typescriptいろいろ

Posted at

モジュール関連

export/importのいろいろ

export default class Foo {}   => import x from 'y'
/* or */
class Foo {}
export = Foo;                 => import x = require('y')
/* or */
export class Foo { }          => import { Foo } from 'y' | import * as x from 'y'

import x = require('y');
import x from 'y';
import { x } from 'y'
import * as x from 'y';

参考:
module FAQ
モジュール説明

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1