@atvise/types-webmi

Type definitions for webmi.js

Usage no npm install needed!

<script type="module">
  import atviseTypesWebmi from 'https://cdn.skypack.dev/@atvise/types-webmi';
</script>

README

@atvise/types-webmi

Type definitions for webmi.js

Please note that these definitions are currently work in progress.

Installation

Run npm install --save-dev @atvise/types-webmi to install this package from npm.

Usage

In your script, that has access to window.webMI add a Tripple-Slash-Directive.

/// <reference types="@atvise/types-webmi" />

// At this point, TypeScript will know the `webMI` global and it's type.

// Fails, because `isPaused()` returns a boolean
const test = webMI.data.isPaused() + 3;

This package is part of the create-atvise-app project.

Refer to it's documentation for more information.