TypeScript プロパティをすべてオプショナルにする方法

Hoge型があります。
type Hoge = {
foo: string,
bar: string,
};このHogeがもつプロパティをすべてオプショナルにする場合、Partial を使います。
type PartialHoge = Partial<Hoge>;Webエンジニアの記録

Hoge型があります。
type Hoge = {
foo: string,
bar: string,
};このHogeがもつプロパティをすべてオプショナルにする場合、Partial を使います。
type PartialHoge = Partial<Hoge>;
最近のコメント