# tiled-types

> Type definitions of Tiled generated JSON

Latest version **1.3.0** (published 2021-02-07) · MIT license · 0 weekly downloads

## Install

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

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2021-02-07 |
| First published | 2020-01-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 10.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 17 |
| Author | Richard Haddad |
| Maintainers | chnapy |
| Keywords | tiled, typescript, types |

## Links

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

## 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.3.0 (latest) — 2021-02-07
- 1.2.1 — 2020-11-22
- 1.2.0 — 2020-11-22
- 1.1.0 — 2020-05-16
- 1.0.0 — 2020-01-10

## README

# tiled-types

Type definitions of Tiled generated JSON https://github.com/bjorn/tiled.

[![Build Status](https://travis-ci.com/Chnapy/tiled-types.svg?branch=master)](https://travis-ci.com/Chnapy/tiled-types)

Made for Tiled 1.4.

Based on its documentation https://doc.mapeditor.org/en/stable/reference/json-map-format.

## Installation

```
npm install tiled-types
```

## Use

```typescript
import TiledMap, { TiledLayerTilelayer } from "tiled-types";

// Assume we're in node context
const map: TiledMap = fs.readFileSync('path/to/schema.json', 'utf8');

const allTilelayers: TiledLayerTilelayer[] = map.layers
    .filter((l): l is TiledLayerTilelayer => l.type === 'tilelayer');
```
You can find quite the same example [here](types/tiled-tests.ts)

## Credits

Thanks to [type-zoo](https://github.com/pelotom/type-zoo) for there repo configuration :+1:

And to [Tiled contributors](https://github.com/bjorn/tiled/graphs/contributors) :100:

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