@rhao/types-base
TypeScript icon, indicating that this package has built-in type declarations

1.7.0 • Public • Published

@rhao/types-base

Typescript 常用的类型工具。

迁移至 v1.x

  • 移除 Builtin 类型
  • 移除 GetterMaybeGetter 类型,推荐使用 FnMaybeFn 替代
  • DeepReadonly => ReadonlyDeep
  • DeepPartial => PartialDeep
  • ElementOf 支持数组、对象获取元素类型,单一获取推荐 ArrayElementOfObjectElementOf
  • RecordElementOf => ObjectElementOf
  • Mutable => WritableMutableWith => WritableWithMutableWithout => WritableWithout
  • IfUnknownIfNeverIfEmpty 默认成功和失败值改为 truefalse
  • KeyOf 默认不再限于 string
  • 移除 PromiseResult 类型,推荐使用 Awaited 替代

Readme

Keywords

Package Sidebar

Install

npm i @rhao/types-base

Weekly Downloads

2

Version

1.7.0

License

MIT

Unpacked Size

15.2 kB

Total Files

6

Last publish

Collaborators

  • lei-hh