Registry / devops / typescript-move

typescript-move

JSON →
library1.1.1jsnpmunverified

A TypeScript to Sui Move transpiler that allows developers to write Sui smart contracts using TypeScript syntax. Current stable version is 1.1.1, with active development and a v2 documentation available. It bridges the gap between web and blockchain development, enabling familiar TypeScript patterns for Move smart contracts on Sui. Key differentiators: no new language to learn, leverages TypeScript tooling, targets the Sui blockchain specifically.

npm install typescript-move
INSTALL
IMPORT
SIG · TYPESCRIPT-MOVE
T
typescript-move
devopsjavascriptv1.1.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import typescriptMove from 'typescript-move'
const typescriptMove = require('typescript-move')
ESM-only; CommonJS require will fail.
transpile
import { transpile } from 'typescript-move'
import transpile from 'typescript-move'
Named export, not default.
compile
import { compile } from 'typescript-move'
import { compile as tsm } from 'typescript-move'
Use directly; no alias needed.

Transpile a simple TypeScript function to Sui Move using the transpile function.

import { transpile } from 'typescript-move'; const tsCode = ` function transfer(to: address, amount: u64) { balance.balanceOf(to) } `; transpile(tsCode).then(result => { console.log(result.moveCode); }).catch(err => { console.error(err); });
Debug
Known issues
breakingVersion 2.0 rewrites transpile API: 'compile' is replaced with 'transpile' and returns a promise.
fix
Use 'transpile' from version 2.x; check docs for migration.
affects: >=2.0
gotchaOnly supports a subset of TypeScript; features like async/await, classes, and decorators are not supported.
fix
Refer to the supported syntax documentation on the project site.
affects: >=1.0
gotchaRequires Node.js >=14; no browser support.
fix
Ensure Node.js version meets requirement.
affects: >=1.0
deprecatedThe 'output' option in transpile config is deprecated; use 'format' instead.
fix
Replace 'output' with 'format' in config object.
affects: >=1.1
Errors
Common errors & fixes
Cannot find module 'typescript-move'
Package not installed or ESM context missing.
fix
Run 'npm install typescript-move' and use 'import' syntax.
TypeError: transpile is not a function
Using default import instead of named import.
fix
Use named import: import { transpile } from 'typescript-move'.
Upgrade
Version history
1.1.1latest on npm
Audit
Dependencies
typescriptrequiredRequired as a peer dependency for type checking and transpilation pipeline
Agent activity
2 hits · last 30 days
node
2
Resources
typescript-move — npm install typescript-move · libregistry