Provides typing for the Miro WebSDK v2.
Using npm
npm install @mirohq/websdk-types
Using yarn
yarn add @mirohq/websdk-types
Using pnpm
pnpm add @mirohq/websdk-types
Include the types file inside your tsconfig.json
file like this:
{
"compilerOptions": {
+ "typeRoots": [
+ "./node_modules/@types",
+ "./node_modules/@mirohq"
+ ]
}
}
This step does not add types to your project, but it improves your autocompletion experience. This typically works with all modern editors & IDEs. If you encounter an issue, check the documentation for your editor.
-
Create the
jsconfig.json
file at the root of your project. -
Add the following
{
"compilerOptions": {
"typeRoots": ["./node_modules/@types", "./node_modules/@mirohq"]
}
}
- You should be able to get autocompletion working inside your JavaScript project.