1 Star 0 Fork 0

Sunny / type-challenges

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.ja.md 1.93 KB
一键复制 编辑 原始数据 按行查看 历史
antfu 提交于 2022-04-19 12:07 . chore: rename branch

Get Optional 上級 #utils #infer

by Zheeeng @zheeeng

挑戦する    English 简体中文

オプショナルなフィールドのみを残す高度なユーティリティ型 GetOptional<T> を実装してください。

例えば

type I = GetOptional<{ foo: number, bar?: string }> // expected to be { bar?: string }

戻る 解答を共有 解答を確認

関連する課題

57・Get Required
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ztes/type-challenges.git
git@gitee.com:ztes/type-challenges.git
ztes
type-challenges
type-challenges
main

搜索帮助