エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
TypeScript: deep partial?
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
TypeScript: deep partial?
Is there a way to specify a partial type in TypeScript that also makes all child objects partials... Is there a way to specify a partial type in TypeScript that also makes all child objects partials as well? For example: interface Foobar { foo: number; bar: { baz: boolean; qux: string; }; } const foobar: Partial<Foobar> = { foo: 1, bar: { baz: true } }; This throws the following error: TS2741: Property 'qux' is missing in type '{ baz: true; }' but required in type '{ baz: boolean; qux: string; }'

