Skip to main content

Built and signed on GitHub Actions

unplugin for Typia with an extra Bun plugin 🫶

This package works with Node.js, Bun
This package works with Node.js
This package works with Bun
JSR Score
100%
Published
4 days ago (1.1.0)
function default
default(bunOptions?: BunOptions): BunPlugin

bun plugin

Also, check the Plugins – Runtime | Bun Docs & Plugins – Bundler | Bun Docs for more details.

Examples

Example 1

// build.ts

import UnpluginTypia from '@ryoppippi/unplugin-typia/bun'

Bun.build({
  entrypoints: ['./index.ts'],
  outdir: './out',
  plugins: [
    UnpluginTypia({ /* your options *\/})
 ]
})
$ node build.ts

Example 2

// preload.ts
import { plugin } from 'bun';
import UnpluginTypia from '@ryoppippi/unplugin-typia/bun'

plugin(UnpluginTypia({ /* your options *\/}))
preload = ["./preload.ts"]

[test]
preload = ["./preload.ts"]
$ bun run ./index.ts

When you run your scripts on Bun.runtime, You cannot use named import for typia value in the source code. Check out the README.md.

Parameters

optional
bunOptions: BunOptions

Return Type

Add Package

npx jsr add @ryoppippi/unplugin-typia

Import symbol

import mod from "@ryoppippi/unplugin-typia/bun";

Add Package

yarn dlx jsr add @ryoppippi/unplugin-typia

Import symbol

import mod from "@ryoppippi/unplugin-typia/bun";

Add Package

pnpm dlx jsr add @ryoppippi/unplugin-typia

Import symbol

import mod from "@ryoppippi/unplugin-typia/bun";

Add Package

bunx jsr add @ryoppippi/unplugin-typia

Import symbol

import mod from "@ryoppippi/unplugin-typia/bun";