<aside> ◻️ L I F E

<aside> 📝 2022/12/25 知識系はツェッテルカステンベースで再整理中(✅  再整理完了 ‣ )

</aside>

<aside> 💡 目次

</aside>

<aside> 📆 2021/01/25 作った 2021/02/06 追記 知らなかった知識を追記

</aside>

自分の基本スタンス

反復処理可能な union 型の定義する

インデックス型(Index Signatures)

type Butterfly = {
  [key: string]: string;
}

Mapped type

type SystemSupportLanguage = 'en' | 'fr' | 'it' | 'es';

type Butterfly = {
  [key in SystemSupportLanguage]: string;
};

Required<T> Partial<T>

const assertion

Pick<T, K>

type Mandatory = 'surname' | 'middleName' | 'givenName';
type Person = Pick<User, Mandatory>;

関連