# TypeScript 匯入方式 ## 寫法 * 使用 import 導入其他相關型別 ``` import { TodoStatus } from "./TaskStatus"; ``` * 命名匯出 (Named Exports)**推薦** ``` import { TodoStatus } from "./TaskStatus"; export interface Task { title: string; status: TodoStatus; } ``` * 默認匯出 **不建議** ``` export default interface Task { title: string; status: TodoStatus; } ``` ### 列舉 限用 使用**命名匯出**的方式, ``` export enum TodoStatus { Todo, imProgress, Done } ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up