# types-object

> Literally just supporting JavaScript Object() in TypeScript

Latest version **0.5.0** (published 2024-06-26) · CC0-1.0 license · 0 weekly downloads

## Install

```sh
npm install types-object
pnpm add types-object
yarn add types-object
bun add types-object
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.0 |
| Published | 2024-06-26 |
| First published | 2022-07-27 |
| Weekly downloads | 0 |
| License | CC0-1.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |

## Links

- npm: https://www.npmjs.com/package/types-object
- npm.io page: https://npm.io/package/types-object

## Recent versions

- 0.5.0 (latest) — 2024-06-26
- 0.4.0 — 2024-05-30
- 0.3.0 — 2022-08-19
- 0.2.0 — 2022-08-01
- 0.1.2 — 2022-07-29
- 0.1.1 — 2022-07-27
- 0.1.0 — 2022-07-27

## README

# Types Object <a href="https://www.npmjs.com/package/types-object" target="_blank"><img src="https://img.shields.io/npm/v/types-object?color=%23444&label=&labelColor=%23CB0000&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjE1MCAxNTAgNDAwIDQwMCIgZmlsbD0iI0ZGRiI+PHBhdGggZD0iTTE1MCA1NTBoMjAwVjI1MGgxMDB2MzAwaDEwMFYxNTBIMTUweiIvPjwvc3ZnPg==&style=for-the-badge" alt="" align="right" valign="middle" height="32" /></a>

Literally just supporting JavaScript `Object()` in TypeScript.

This includes typing for:
- `Object()`
- `new Object()`
- `Object.create()`
- `Object.hasOwn()`
- `Object.getPrototypeOf()`
- `Object.setPrototypeOf()`

```ts
const love = { is: 'real' } as const
const real = Object(love)
const know = Object.hasOwn(love, 'is')

love.is /* (property) is: "real" */

real /* const real: {
  readonly is: "real";
} */

know /* const know: true */
```

### Usage

Add `types-object` to the array of `types` in `compilerOptions`, in either `tsconfig.json` or `jsconfig.json`.

```ts
{
  "compilerOptions": {
    "types": ["types-object"]
  }
}
```

Alternatively, use `types-object/constructor` if you only wish to include types for `Object()` and `new Object()`

```ts
{
  "compilerOptions": {
    "types": ["types-object/constructor"]
  }
}
```

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