# @rhao/types-base

> 基础通用类型定义。

Latest version **1.8.0** (published 2025-03-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install @rhao/types-base
pnpm add @rhao/types-base
yarn add @rhao/types-base
bun add @rhao/types-base
```

## Health

**Score 35/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.8.0 |
| Published | 2025-03-20 |
| First published | 2023-08-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=14 |
| Dependencies | 0 |
| Unpacked size | 362.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | RayHao |
| Maintainers | lei-hh |
| Keywords | ts, typescript, types |

## Links

- npm: https://www.npmjs.com/package/@rhao/types-base
- Repository: https://github.com/l246804/types
- Homepage: https://github.com/l246804/types/tree/dev/packages/base
- Issues: https://github.com/l246804/types/issues
- npm.io page: https://npm.io/package/@rhao/types-base

## Alternatives

- [csv-to-markdown-table](https://npm.io/package/csv-to-markdown-table.md) — 47.0K weekly downloads
- [@sapphire/ratelimits](https://npm.io/package/@sapphire/ratelimits.md) — 4.4K weekly downloads
- [js-csvparser](https://npm.io/package/js-csvparser.md) — 2.0K weekly downloads
- [@adadapted/js-sdk](https://npm.io/package/@adadapted/js-sdk.md) — 251 weekly downloads
- [@grapecity/spread-sheets-sparklines](https://npm.io/package/@grapecity/spread-sheets-sparklines.md) — 103 weekly downloads

## Recent versions

- 1.8.0 (latest) — 2025-03-20
- 1.7.0 — 2024-08-15
- 1.6.0 — 2024-07-29
- 1.5.0 — 2024-07-29
- 1.4.0 — 2024-06-05
- 1.3.0 — 2024-03-27
- 1.2.0 — 2024-03-18
- 1.1.0 — 2024-03-05
- 1.0.0 — 2024-02-02
- 0.7.0 — 2023-12-24
- 0.6.0 — 2023-12-14
- 0.5.0 — 2023-12-14
- 0.4.0 — 2023-12-13
- 0.3.0 — 2023-11-01
- 0.2.1 — 2023-10-20
- … 5 more at https://npm.io/package/@rhao/types-base/versions

## README

# `@rhao/types-base`

`Typescript` 常用的类型工具。

## 迁移至 v1.x

- 移除 `Builtin` 类型
- 移除 `Getter`、`MaybeGetter` 类型，推荐使用 `Fn`、`MaybeFn` 替代
- `DeepReadonly` => `ReadonlyDeep`
- `DeepPartial` => `PartialDeep`
- `ElementOf` 支持数组、对象获取元素类型，单一获取推荐 `ArrayElementOf`、`ObjectElementOf`
- `RecordElementOf` => `ObjectElementOf`
- `Mutable` => `Writable`、`MutableWith` => `WritableWith`、`MutableWithout` => `WritableWithout`
- `IfUnknown`、`IfNever`、`IfEmpty` 默认成功和失败值改为 `true` 和 `false`
- `KeyOf` 默认不再限于 `string`
- 移除 `PromiseResult` 类型，推荐使用 `Awaited` 替代

---
_Source: https://npm.io/package/@rhao/types-base · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
