# nodecg-types

> Types from nodecg but without all the baggage and dependencies

Latest version **1.9.0** (published 2022-08-07) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.9.0 |
| Published | 2022-08-07 |
| First published | 2021-08-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 13.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | promasu, daniel0611, sebinside, ungefroren |
| Keywords | nodecg, types |

## Links

- npm: https://www.npmjs.com/package/nodecg-types
- Repository: https://github.com/codeoverflow-org/nodecg-types
- Homepage: https://github.com/codeoverflow-org/nodecg-types#readme
- Issues: https://github.com/codeoverflow-org/nodecg-types/issues
- npm.io page: https://npm.io/package/nodecg-types

## Dependencies (5)

- [@types/node](https://npm.io/package/@types/node.md) ^16.7.1
- [@types/express](https://npm.io/package/@types/express.md) ^4.17.13
- [@types/soundjs](https://npm.io/package/@types/soundjs.md) ^0.6.28
- [@types/socket.io](https://npm.io/package/@types/socket.io.md) ^2.1.2
- [@types/socket.io-client](https://npm.io/package/@types/socket.io-client.md) ^1.4.32

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.9.0 (latest) — 2022-08-07
- 1.8.3 — 2021-10-28
- 1.8.2 — 2021-09-25
- 1.8.1 — 2021-08-25

## README

# nodecg-types

If you are developing [NodeCG](https://nodecg.dev) bundles in TypeScript you need typings for nodecg.

The [official guide](https://www.nodecg.dev/docs/frameworks/typescript#using-type-definitions) recommends that you import them directly from the local NodeCG installation using relative paths. This can easily break if the install NodeCG version is incorrect or the user has placed your bundle somewhere other than in `nodecgInstall/bundles/yourBundle`. Also your bundle cannot be compiled if you don't have NodeCG installed.

Some people require the `nodecg` npm package directly to get around these problems. However this pulls in all the dependencies of NodeCG into your project/`node_modules` directory which are tremendous in count and size.
Because of this `npm install`s are pretty slow and also you have NodeCG stored multiple times on your disk. Once for your actual install and then one additional install for each TypeScript bundle that imports the NodeCG typings this way.

`nodecg-types` solves this by republishing just the [official NodeCG types](https://github.com/nodecg/nodecg/tree/master/types). It does not contain any other NodeCG code and only has the dependencies that are needed for the typings to work.

Note: this is an unofficial package and a temporary workaround till NodeCG 2.x is released! Please refer to [this](https://github.com/nodecg/nodecg/issues/552) issue regarding how the official NodeCG typings will be handled in the future.

## Usage

`nodecg-types` behaves the same way as the official `nodecg` npm package regarding types.

You install it using npm:

```shell
npm install nodecg-types --save
```

And then import the typings you need. The paths are completely the same meaning `nodecg-types` is a drop-in replacement and you can just exchange `nodecg` for `nodecg-types`:

```typescript
import { NodeCG } from "nodecg-types/types/server";
```

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