mirror of
https://github.com/oven-sh/bun
synced 2026-02-16 05:42:43 +00:00
37 lines
727 B
TypeScript
37 lines
727 B
TypeScript
import { t, fn } from "bindgen";
|
|
|
|
export const BracesOptions = t.dictionary({
|
|
tokenize: t.boolean.default(false),
|
|
parse: t.boolean.default(false),
|
|
});
|
|
|
|
export const braces = fn({
|
|
args: {
|
|
global: t.globalObject,
|
|
input: t.DOMString,
|
|
options: BracesOptions.default({}),
|
|
},
|
|
ret: t.any,
|
|
});
|
|
|
|
export const gc = fn({
|
|
args: {
|
|
vm: t.zigVirtualMachine,
|
|
force: t.boolean.default(false),
|
|
},
|
|
ret: t.usize,
|
|
});
|
|
|
|
export const StringWidthOptions = t.dictionary({
|
|
countAnsiEscapeCodes: t.boolean.default(false),
|
|
ambiguousIsNarrow: t.boolean.default(true),
|
|
});
|
|
|
|
export const stringWidth = fn({
|
|
args: {
|
|
str: t.DOMString.default(""),
|
|
opts: StringWidthOptions.default({}),
|
|
},
|
|
ret: t.usize,
|
|
});
|