Skip to main content

TypeScript Support

This guide offers a detailed walkthrough on how to proficiently develop MiniPrograms employing TypeScript.

Inclusion of DevDependencies#

Embark by installing the necessary devDependencies:

# Optional# Set npm to default to @binance registry# npm config set @binance:registry https://npm.binance.com
# Install devDependencies$ npm install @binance/mp-service @binance/mp-components --dev

Following the successful installation of devDependencies, proceed to import them as illustrated below:

import mpService from '@binance/mp-service'import { View, Text, Button } from '@binance/mp-components'

Equipped with these devDependencies and their rightful Import methods, you're now well-prepared to venture further into the realm of MiniProgram development with TypeScript!