# ts-global-type-extra

> 全域擴展 TypeScript 內建類型，提供更好的 Object.entries 類型推論 | Global extension of TypeScript built-in types with better Object.entries type inference

Latest version **1.0.5** (published 2026-05-05) · ISC license · 11 weekly downloads

## Install

```sh
npm install ts-global-type-extra
pnpm add ts-global-type-extra
yarn add ts-global-type-extra
bun add ts-global-type-extra
```

## Health

**Score 55/100 (C)** — status: active.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2026-05-05 |
| First published | 2021-07-23 |
| Weekly downloads | 11 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | bluelovers |
| Maintainers | bluelovers |
| Keywords | .d.ts, @types, declaration, dev, develop, development, environment, ide, interface, node, playground, runtime, ts, type, type-level, typelevel, types, typescript, typing, typings, type-helprt, toolbox, toolbelt |

## Links

- npm: https://www.npmjs.com/package/ts-global-type-extra
- Repository: https://github.com/bluelovers/ws-ts-type
- Homepage: https://github.com/bluelovers/ws-ts-type/tree/master/packages/ts-global-type-extra#readme
- Issues: https://github.com/bluelovers/ws-ts-type/issues
- npm.io page: https://npm.io/package/ts-global-type-extra

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) *

## Alternatives

- [replicas-cli](https://npm.io/package/replicas-cli.md) — 3.0K weekly downloads
- [env-contract](https://npm.io/package/env-contract.md) — 133 weekly downloads
- [@openveo/api](https://npm.io/package/@openveo/api.md) — 61 weekly downloads
- [@ryniaubenpm2/cumque-error-reiciendis](https://npm.io/package/@ryniaubenpm2/cumque-error-reiciendis.md) — 54 weekly downloads
- [zulip-cloud9](https://npm.io/package/zulip-cloud9.md) — 3 weekly downloads

## Recent versions

- 1.0.5 (latest) — 2026-05-05
- 1.0.4 — 2026-03-07
- 1.0.3 — 2022-10-10
- 1.0.2 — 2021-07-23
- 1.0.1 — 2021-07-23

## README

# ts-global-type-extra

全域擴展 TypeScript 內建類型，提供更好的 Object.entries 類型推論

Global extension of TypeScript built-in types with better Object.entries type inference

## 功能特點 / Features

- 為 Object.entries 提供精確的鍵值對類型
- Provide precise key-value pair types for Object.entries
- 全域類型擴展，無需匯入即可使用
- Global type extension, no import required
- 支援物件字面值與 ArrayLike 類型
- Support object literals and ArrayLike types

## 安裝 / Install

```bash
yarn add ts-global-type-extra
yarn-tool add ts-global-type-extra
yt add ts-global-type-extra
```

## 使用範例 / Usage Example

```typescript
// 無需匯入，全域可用
const obj = { name: 'John', age: 30 } as const;

const entries = Object.entries(obj);
// type: ["name", "John"][] | ["age", 30][]

// 對於非 const 宣告
const obj2 = { a: 1, b: 2 };
const entries2 = Object.entries(obj2);
// type: [string, number | string][]
```

---
_Source: https://npm.io/package/ts-global-type-extra · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
