You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@workadventure/tiled-map-type-guard

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@workadventure/tiled-map-type-guard

Typescript package boilerplate template


Version published
Maintainers
2
Created

Readme

Source

Tiled map type guards

Github Actions codecov

When working with Tiled maps, it can be useful to have property defined types in Typescript.

This package contains a set of interfaces that map the Tiled map JSON format.

Moreover, this package comes with Zod type guards that will allow you to actually check that the JSON file ou are reading is actually a well-formed Tiled map.

Available interfaces:

  • ITiledMap
  • ITiledMapLayer
    • ITiledMapGroupLayer
    • ITiledMapImageLayer
    • ITiledMapObjectLayer
      • ITiledMapObject
        • ITiledMapText
        • ITiledMapPoint
    • ITiledMapTileLayer
  • ITiledMapTileset
    • ITiledMapTile
      • ITiledMapWangColor
      • ITiledMapWangSet
      • ITiledMapWangTile
  • ITiledMapChunk
  • ITiledMapFrame
  • ITiledMapGrid
  • ITiledMapOffset
  • ITiledMapProperty
  • ITiledMapTerrain
  • ITiledMapTransformations

Usage:

// This will throw an error if "data" is not matching the type ITiledMap
const map: ITiledMap = ITiledMap.parse(data);

Keywords

FAQs

Package last updated on 20 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc