Skip to content

TypeScript declarations for midtrans-client. This package is intended to provide type safety when using Midtrans SDK in a TypeScript project.

License

Notifications You must be signed in to change notification settings

farhantallei/midtrans-client-types

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@types/midtrans-client

TypeScript declarations for midtrans-client.
This package is intended to provide type safety when using Midtrans SDK in a TypeScript project.

⚠️ Not an official package. Created and maintained by the community.


📦 Installation

You can install this package directly from GitHub:

Using Bun

bun add -D github:farhantallei/midtrans-client-types

Using npm

npm install -D github:farhantallei/midtrans-client-types

Using Yarn

yarn add -D github:farhantallei/midtrans-client-types

Using pnpm

pnpm add -D github:farhantallei/midtrans-client-types

⚙️ Usage

Since this package only provides type declarations, you still need to install the actual midtrans-client package:

npm install midtrans-client
# or
yarn add midtrans-client
# or
pnpm add midtrans-client
# or
bun add midtrans-client

Then just use it in your TypeScript code as usual:

import midtrans from "midtrans-client"

const snap = new midtrans.Snap({
  isProduction: false,
  serverKey: process.env.MIDTRANS_SERVER_KEY!,
  clientKey: process.env.MIDTRANS_CLIENT_KEY!,
})

No additional config is needed in your tsconfig.json since it follows standard TypeScript declaration structure.


📄 License

This project is licensed under the MIT License.

About

TypeScript declarations for midtrans-client. This package is intended to provide type safety when using Midtrans SDK in a TypeScript project.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published