By including the definition file stamplay.d.ts, it is possible to use the Stamplay library in TypeScript and take advantage of strong types. It is also possible to use the typings file to provide intellisense in plain Javascript.
In order to use the typings file, make sure you have the latest version of TypeScript
npm install typescript -g
After installing the stamplay sdk with npm install stamplay-sdk:
if using TypeScript, import the module in your .ts file with
import * as Stamplay from "stamplay-sdk";
if using plain javascript, import the typings for intellisense support in your .js file by including the triple-slash directive
/// <reference types="stamplay-sdk"/>
By including the definition file stamplay.d.ts, it is possible to use the Stamplay library in TypeScript and take advantage of strong types. It is also possible to use the typings file to provide intellisense in plain Javascript.
In order to use the typings file, make sure you have the latest version of TypeScript
npm install typescript -g
After installing the stamplay sdk with
npm install stamplay-sdk
:import * as Stamplay from "stamplay-sdk";
/// <reference types="stamplay-sdk"/>
This has been tested in Visual Studio Code.