@jest-com/types
v1.260928.9
Published
TypeScript types for the Jest HTML5 game SDK global (window.JestSDK).
Readme
@jest-com/types
TypeScript types for the Jest HTML5 game SDK.
The SDK runtime is loaded from the CDN, not from npm. This package only
describes the global JestSDK object that script creates.
<script defer src="https://cdn.jest.com/sdk/latest/jestsdk.js"></script>npm install --save-dev @jest-com/typesSetup
TypeScript auto-loads types only from node_modules/@types/*, so name this
package in your tsconfig.json:
{
"compilerOptions": {
"types": ["vite/client", "@jest-com/types"]
}
}List every type package you rely on. A types array replaces TypeScript's
automatic inclusion, so anything left out of it stops being picked up.
To avoid managing that list, add a .d.ts under your source root instead. Vite
projects already have src/vite-env.d.ts for this:
/// <reference types="vite/client" />
/// <reference types="@jest-com/types" />Either way, JestSDK and window.JestSDK are typed globals in every file:
await JestSDK.init();
const player = JestSDK.getPlayer();Named types are exported for your own signatures:
import type { Jest, PlayerProfile, SubscriptionData } from "@jest-com/types";Full docs: https://docs.jest.com/sdk/html5
