Movatterモバイル変換


[0]ホーム

URL:


Skip to Content
DocsAPI References@swc/wasm-typescript

@swc/wasm-typescript

Installation

npm install @swc/wasm-typescript

Usage

import { transform }from '@swc/wasm-typescript';const tsSourceCode = `export function add(a: number, b: number) { return a + b;}`;const code = await transform(tsSourceCode, {})

APIs

transform, transformSync

Types

type Options = { // Defaults to 'unknown', which automatically detects the module type. module?: boolean | 'unknown' filename?: string; parser?: TsSyntax}
Last updated on
BenchmarksMigrating from Babel
Powered by
[8]ページ先頭

©2009-2026 Movatter.jp