0.0.10-beta • Published 5 months ago

@tiktok-minis/minigames-sdk-types v0.0.10-beta

Weekly downloads
-
License
ISC
Repository
-
Last release
5 months ago

Set up TikTok MiniGames SDK type hints

Introduction

To integrate the TikTok miniGames SDK type hints into your TypeScript project, you need to install the necessary type definitions and configure your tsconfig.json file. This guide will walk you through these steps.

Step 1: Install TikTok Mini Games SDK Types

First, you need to install the type definitions for the TikTok Mini Games SDK. This can be done using npm:

npm install --save-dev @tiktok-minis/minigames-sdk-types

This command installs the type definitions as a development dependency, ensuring that your project can use them for type checking.

Step 2: Configure tsconfig.json

After installing the type definitions, you need to configure your tsconfig.json file to include these types. Here’s how you can do it:

{
  "compilerOptions": {
    "typeRoots": [".node_modules/@types", "./node_modules/@tiktok-minis/minigames-sdk-types"]
  }
}

In this configuration:

  • compilerOptions: This section contains settings for the TypeScript compiler.
  • types: This option specifies which type declaration files to include in the compilation. By listing @tiktok-minis/minigames-sdk-types, you ensure that the TikTok Mini Games SDK types are available globally in your project.

Explanation

By specifying the types option in tsconfig.json, you control which type definitions are included in your project's global scope.

0.0.10-beta

5 months ago

0.0.8-beta

5 months ago

0.0.7-beta

5 months ago

0.0.6-beta

5 months ago

0.0.5-beta

5 months ago

0.0.4-beta

5 months ago

0.0.3-beta

5 months ago

0.0.2-beta

5 months ago

0.0.1-beta

5 months ago