6acf0ff047
If users are willing to use Typescript to develop scripts for maps, they will need typings for the `WA` object. This commit creates a new package (@workadventure/iframe-api-typings) that contains only the `iframe_api.d.ts` file. The file is generated from the build of the front and isolated in this package. This is necessary because the iframe_api.js file is supposed to always be loaded from WorkAdventure directly (and there is no @workadventure/iframe-api package and there will never be one)
918 B
918 B
WorkAdventure - IFrame API typings for Typescript
This package contains Typescript typings for WorkAdventure's map scripting API
WorkAdventure comes with a scripting API. Using this API, you can add some intelligence to your map. You use this API by loading an external script directly from WorkAdventure (at https://play.workadventu.re/iframe_api.js), or this script is loaded for you if you are using the "script" property of a map.
This project contains Typescript typings for the WA
object provided by this script.
Usage
This package is only useful if you are using Typescript to script your WorkAdventure maps.
Download & Installation
$ npm install @workadventure/iframe-api-typings
or
$ yarn add @workadventure/iframe-api-typings