最終更新:2022-12-16 (金) 08:44:18 (490d)  

TypeScript/型
Top / TypeScript / 型

TypeScript/型推論

  • 型を省略すると型推論される
  • 初期値がないとundefined
  • 初期値がnullだとany

取得

  • typeof

TypeScript/型アノテーション

TypeScript/ジェネリクス

TypeScript/基本型

TypeScript/型エイリアス

高等な型

TypeScript/交差型(Intersection Types)

TypeScript/共用体型?(Union Types)

型の保護と型の識別(Type Guards and Differentiating Types)

Nullの型(Nullable types)

型のエイリアス(Type Aliases)

TypeScipt/文字列リテラル型 (String Literal Types)

  • 指定した文字のみ許容

TypeScipt/数値リテラル型

判別共用体(Discriminated Unions)

多様性のthisの型(Polymorphic this types)