2023-04-06 12:04:53 +09:00
|
|
|
/* auto-generated by NAPI-RS */
|
2021-11-21 19:23:53 +09:00
|
|
|
/* eslint-disable */
|
|
|
|
|
2021-12-19 21:19:33 +09:00
|
|
|
|
2021-11-21 17:11:15 +09:00
|
|
|
export class ExternalObject<T> {
|
2021-11-21 19:23:53 +09:00
|
|
|
readonly '': {
|
|
|
|
readonly '': unique symbol
|
|
|
|
[K: symbol]: T
|
|
|
|
}
|
2021-11-21 17:11:15 +09:00
|
|
|
}
|
2021-11-29 13:54:45 +09:00
|
|
|
/**
|
|
|
|
* `constructor` option for `struct` requires all fields to be public,
|
|
|
|
* otherwise tag impl fn as constructor
|
|
|
|
* #[napi(constructor)]
|
|
|
|
*/
|
2021-09-23 02:29:09 +09:00
|
|
|
export class Animal {
|
2021-11-29 13:54:45 +09:00
|
|
|
/** Kind of animal */
|
2021-09-23 02:29:09 +09:00
|
|
|
readonly kind: Kind
|
2021-11-29 13:54:45 +09:00
|
|
|
/** This is the constructor */
|
2021-09-23 02:29:09 +09:00
|
|
|
constructor(kind: Kind, name: string)
|
2021-11-29 13:54:45 +09:00
|
|
|
/** This is a factory method */
|
2021-11-05 19:31:36 +09:00
|
|
|
static withKind(kind: Kind): Animal
|
2021-09-24 14:00:35 +09:00
|
|
|
get name(): string
|
|
|
|
set name(name: string)
|
2022-05-13 13:55:54 +09:00
|
|
|
get type(): Kind
|
|
|
|
set type(kind: Kind)
|
2021-11-29 13:54:45 +09:00
|
|
|
/**
|
|
|
|
* This is a
|
|
|
|
* multi-line comment
|
|
|
|
* with an emoji 🚀
|
|
|
|
*/
|
2021-09-23 02:29:09 +09:00
|
|
|
whoami(): string
|
2021-11-29 13:54:45 +09:00
|
|
|
/** This is static... */
|
2021-09-24 21:19:54 +09:00
|
|
|
static getDogKind(): Kind
|
2022-01-17 13:38:16 +09:00
|
|
|
/**
|
|
|
|
* Here are some characters and character sequences
|
|
|
|
* that should be escaped correctly:
|
2023-04-06 12:04:53 +09:00
|
|
|
* \[]{}/\:""{
|
|
|
|
* }
|
2022-01-17 13:38:16 +09:00
|
|
|
*/
|
2021-12-23 15:07:35 +09:00
|
|
|
returnOtherClass(): Dog
|
2021-12-24 19:46:10 +09:00
|
|
|
returnOtherClassWithCustomConstructor(): Bird
|
2022-05-22 14:43:11 +09:00
|
|
|
overrideIndividualArgOnMethod(normalTy: string, overriddenTy: {n: string}): Bird
|
2021-12-23 15:07:35 +09:00
|
|
|
}
|
2023-04-06 12:04:53 +09:00
|
|
|
|
|
|
|
export class AnimalWithDefaultConstructor {
|
2021-12-23 15:07:35 +09:00
|
|
|
name: string
|
2023-04-06 12:04:53 +09:00
|
|
|
kind: number
|
|
|
|
constructor(name: string, kind: number)
|
|
|
|
}
|
|
|
|
|
|
|
|
export class AnotherClassForEither {
|
|
|
|
constructor()
|
|
|
|
}
|
|
|
|
|
|
|
|
export class AnotherCssStyleSheet {
|
|
|
|
get rules(): CssRuleList
|
|
|
|
}
|
|
|
|
export type AnotherCSSStyleSheet = AnotherCssStyleSheet
|
|
|
|
|
|
|
|
export class Asset {
|
|
|
|
constructor()
|
|
|
|
get filePath(): number
|
|
|
|
}
|
|
|
|
export type JsAsset = Asset
|
|
|
|
|
|
|
|
export class Assets {
|
|
|
|
constructor()
|
|
|
|
get(id: number): JsAsset | null
|
2021-11-06 12:53:53 +09:00
|
|
|
}
|
2023-04-06 12:04:53 +09:00
|
|
|
export type JsAssets = Assets
|
|
|
|
|
2021-12-24 19:46:10 +09:00
|
|
|
export class Bird {
|
|
|
|
name: string
|
|
|
|
constructor(name: string)
|
2021-12-24 23:56:16 +09:00
|
|
|
getCount(): number
|
2022-11-22 01:17:19 +09:00
|
|
|
getNameAsync(): Promise<string>
|
2021-12-24 19:46:10 +09:00
|
|
|
}
|
2023-04-06 12:04:53 +09:00
|
|
|
|
2021-11-29 13:54:45 +09:00
|
|
|
/** Smoking test for type generation */
|
2021-11-06 12:53:53 +09:00
|
|
|
export class Blake2BHasher {
|
2022-04-26 18:53:54 +09:00
|
|
|
static withKey(key: Blake2bKey): Blake2BHasher
|
2022-04-26 18:49:53 +09:00
|
|
|
update(data: Buffer): void
|
2023-04-06 12:04:53 +09:00
|
|
|
}
|
|
|
|
export type Blake2bHasher = Blake2BHasher
|
|
|
|
|
|
|
|
export class Blake2BKey {
|
|
|
|
|
2021-11-06 12:53:53 +09:00
|
|
|
}
|
2021-12-25 18:35:47 +09:00
|
|
|
export type Blake2bKey = Blake2BKey
|
2023-04-06 12:04:53 +09:00
|
|
|
|
2023-12-27 13:49:10 +09:00
|
|
|
export class CatchOnConstructor {
|
|
|
|
constructor()
|
|
|
|
}
|
|
|
|
|
|
|
|
export class CatchOnConstructor2 {
|
|
|
|
constructor()
|
|
|
|
}
|
|
|
|
|
2023-04-06 12:04:53 +09:00
|
|
|
export class ClassWithFactory {
|
|
|
|
name: string
|
|
|
|
static withName(name: string): ClassWithFactory
|
2023-11-06 11:58:23 +09:00
|
|
|
static with4Name(name: string): Promise<ClassWithFactory>
|
|
|
|
static with4NameResult(name: string): Promise<ClassWithFactory>
|
2023-04-06 12:04:53 +09:00
|
|
|
setName(name: string): this
|
|
|
|
}
|
|
|
|
|
|
|
|
export class Context {
|
|
|
|
maybeNeed?: boolean
|
|
|
|
buffer: Uint8Array
|
|
|
|
constructor()
|
|
|
|
static withData(data: string): Context
|
2022-07-06 20:08:34 +09:00
|
|
|
static withBuffer(buf: Uint8Array): Context
|
2021-11-06 22:48:18 +09:00
|
|
|
method(): string
|
2021-09-23 02:29:09 +09:00
|
|
|
}
|
2023-04-06 12:04:53 +09:00
|
|
|
|
|
|
|
export class CssRuleList {
|
|
|
|
getRules(): Array<string>
|
|
|
|
get parentStyleSheet(): CSSStyleSheet
|
|
|
|
get name(): string | null
|
|
|
|
}
|
|
|
|
export type CSSRuleList = CssRuleList
|
|
|
|
|
|
|
|
export class CssStyleSheet {
|
|
|
|
constructor(name: string, rules: Array<string>)
|
|
|
|
get rules(): CssRuleList
|
|
|
|
anotherCssStyleSheet(): AnotherCssStyleSheet
|
|
|
|
}
|
|
|
|
export type CSSStyleSheet = CssStyleSheet
|
|
|
|
|
|
|
|
export class CustomFinalize {
|
|
|
|
constructor(width: number, height: number)
|
|
|
|
}
|
|
|
|
|
|
|
|
export class Dog {
|
2021-12-08 18:32:16 +09:00
|
|
|
name: string
|
2023-04-06 12:04:53 +09:00
|
|
|
constructor(name: string)
|
|
|
|
}
|
|
|
|
|
|
|
|
export class Fib {
|
|
|
|
[Symbol.iterator](): Iterator<number, void, number>
|
|
|
|
constructor()
|
|
|
|
}
|
|
|
|
|
|
|
|
export class Fib2 {
|
|
|
|
[Symbol.iterator](): Iterator<number, void, number>
|
|
|
|
static create(seed: number): Fib2
|
|
|
|
}
|
|
|
|
|
|
|
|
export class Fib3 {
|
|
|
|
current: number
|
|
|
|
next: number
|
|
|
|
constructor(current: number, next: number)
|
|
|
|
[Symbol.iterator](): Iterator<number, void, number>
|
|
|
|
}
|
|
|
|
|
|
|
|
export class GetterSetterWithClosures {
|
|
|
|
constructor()
|
|
|
|
}
|
|
|
|
|
|
|
|
export class JsClassForEither {
|
|
|
|
constructor()
|
2021-12-08 18:32:16 +09:00
|
|
|
}
|
2023-04-06 12:04:53 +09:00
|
|
|
|
|
|
|
export class JsRemote {
|
|
|
|
name(): string
|
|
|
|
}
|
|
|
|
|
|
|
|
export class JsRepo {
|
|
|
|
constructor(dir: string)
|
|
|
|
remote(): JsRemote
|
|
|
|
}
|
|
|
|
|
2021-12-19 21:17:54 +09:00
|
|
|
export class NinjaTurtle {
|
|
|
|
name: string
|
2022-08-17 16:11:32 +09:00
|
|
|
static isInstanceOf(value: unknown): boolean
|
2021-12-19 21:17:54 +09:00
|
|
|
/** Create your ninja turtle! 🐢 */
|
|
|
|
static newRaph(): NinjaTurtle
|
|
|
|
getMaskColor(): string
|
|
|
|
getName(): string
|
2022-07-06 00:09:40 +09:00
|
|
|
returnThis(this: this): this
|
2021-12-19 21:17:54 +09:00
|
|
|
}
|
2023-04-06 12:04:53 +09:00
|
|
|
|
|
|
|
export class NotWritableClass {
|
|
|
|
name: string
|
|
|
|
constructor(name: string)
|
|
|
|
setName(name: string): void
|
2021-12-25 18:35:47 +09:00
|
|
|
}
|
2023-04-06 12:04:53 +09:00
|
|
|
|
2022-01-21 07:39:22 +09:00
|
|
|
export class Optional {
|
|
|
|
static optionEnd(required: string, optional?: string | undefined | null): string
|
|
|
|
static optionStart(optional: string | undefined | null, required: string): string
|
|
|
|
static optionStartEnd(optional1: string | undefined | null, required: string, optional2?: string | undefined | null): string
|
|
|
|
static optionOnly(optional?: string | undefined | null): string
|
|
|
|
}
|
2023-04-06 12:04:53 +09:00
|
|
|
|
2023-08-17 15:31:30 +09:00
|
|
|
export class Selector {
|
|
|
|
orderBy: Array<string>
|
|
|
|
select: Array<string>
|
|
|
|
struct: string
|
|
|
|
where?: string
|
|
|
|
constructor(orderBy: Array<string>, select: Array<string>, struct: string, where?: string)
|
|
|
|
}
|
|
|
|
|
2022-08-17 18:49:22 +09:00
|
|
|
export class Width {
|
|
|
|
value: number
|
|
|
|
constructor(value: number)
|
|
|
|
}
|
2023-04-06 12:04:53 +09:00
|
|
|
|
|
|
|
export interface A {
|
|
|
|
foo: number
|
2023-03-21 12:22:07 +09:00
|
|
|
}
|
2023-04-06 12:04:53 +09:00
|
|
|
|
|
|
|
export function acceptThreadsafeFunction(func: (err: Error | null, value: number) => any): void
|
|
|
|
|
|
|
|
export function acceptThreadsafeFunctionFatal(func: (value: number) => any): void
|
|
|
|
|
|
|
|
export function acceptThreadsafeFunctionTupleArgs(func: (err: Error | null, arg0: number, arg1: boolean, arg2: string) => any): void
|
|
|
|
|
|
|
|
export function add(a: number, b: number): number
|
|
|
|
|
|
|
|
export const enum ALIAS {
|
|
|
|
A = 0,
|
|
|
|
B = 1
|
2021-11-05 19:31:36 +09:00
|
|
|
}
|
2023-04-06 12:04:53 +09:00
|
|
|
|
|
|
|
export interface AliasedStruct {
|
|
|
|
a: ALIAS
|
|
|
|
b: number
|
2022-01-06 17:16:43 +09:00
|
|
|
}
|
2023-04-06 12:04:53 +09:00
|
|
|
|
|
|
|
export interface AllOptionalObject {
|
|
|
|
name?: string
|
|
|
|
age?: number
|
2022-07-05 18:00:45 +09:00
|
|
|
}
|
2023-04-06 12:04:53 +09:00
|
|
|
|
|
|
|
export function appendBuffer(buf: Buffer): Buffer
|
|
|
|
|
|
|
|
export function arrayBufferPassThrough(buf: Uint8Array): Promise<Uint8Array>
|
|
|
|
|
|
|
|
export function asyncMultiTwo(arg: number): Promise<number>
|
|
|
|
|
|
|
|
export function asyncPlus100(p: Promise<number>): Promise<number>
|
|
|
|
|
|
|
|
export function asyncReduceBuffer(buf: Buffer): Promise<number>
|
|
|
|
|
2023-11-08 21:06:27 +09:00
|
|
|
export function asyncTaskOptionalReturn(): Promise<number | null>
|
|
|
|
|
2023-11-08 21:05:09 +09:00
|
|
|
export function asyncTaskVoidReturn(): Promise<void>
|
|
|
|
|
2023-04-06 12:04:53 +09:00
|
|
|
export interface B {
|
|
|
|
bar: number
|
2022-05-06 18:40:46 +09:00
|
|
|
}
|
2023-04-06 12:04:53 +09:00
|
|
|
|
|
|
|
export function bigintAdd(a: bigint, b: bigint): bigint
|
|
|
|
|
|
|
|
export function bigintFromI128(): bigint
|
|
|
|
|
|
|
|
export function bigintFromI64(): bigint
|
|
|
|
|
|
|
|
export function bigintGetU64AsString(bi: bigint): string
|
|
|
|
|
|
|
|
export function bufferPassThrough(buf: Buffer): Promise<Buffer>
|
|
|
|
|
|
|
|
export interface C {
|
|
|
|
baz: number
|
2022-05-10 22:46:16 +09:00
|
|
|
}
|
2023-04-06 12:04:53 +09:00
|
|
|
|
|
|
|
export function callbackReturnPromise<T>(functionInput: () => T | Promise<T>, callback: (err: Error | null, result: T) => void): T | Promise<T>
|
|
|
|
|
2023-05-16 12:05:37 +09:00
|
|
|
export function callbackReturnPromiseAndSpawn(jsFunc: (arg0: string) => Promise<string>): Promise<string>
|
|
|
|
|
2023-04-06 12:04:53 +09:00
|
|
|
export function callLongThreadsafeFunction(callback: (...args: any[]) => any): void
|
|
|
|
|
|
|
|
export function callThreadsafeFunction(callback: (...args: any[]) => any): void
|
|
|
|
|
|
|
|
export function captureErrorInCallback(cb1: () => void, cb2: (arg0: Error) => void): void
|
|
|
|
|
|
|
|
export function chronoDateAdd1Minute(input: Date): Date
|
|
|
|
|
|
|
|
export function chronoDateToMillis(input: Date): number
|
|
|
|
|
2023-05-26 19:28:34 +09:00
|
|
|
export function chronoNativeDateTime(date: Date): number
|
|
|
|
|
|
|
|
export function chronoNativeDateTimeReturn(): Date | null
|
|
|
|
|
2023-04-06 12:04:53 +09:00
|
|
|
export function concatLatin1(s: string): string
|
|
|
|
|
|
|
|
export function concatStr(s: string): string
|
|
|
|
|
|
|
|
export function concatUtf16(s: string): string
|
|
|
|
|
|
|
|
export function contains(source: string, target: string): boolean
|
|
|
|
|
|
|
|
export function convertU32Array(input: Uint32Array): Array<number>
|
|
|
|
|
|
|
|
export function createBigInt(): bigint
|
|
|
|
|
|
|
|
export function createBigIntI64(): bigint
|
|
|
|
|
|
|
|
export function createExternal(size: number): ExternalObject<number>
|
|
|
|
|
|
|
|
export function createExternalString(content: string): ExternalObject<string>
|
|
|
|
|
|
|
|
export function createExternalTypedArray(): Uint32Array
|
|
|
|
|
|
|
|
export function createObj(): object
|
|
|
|
|
|
|
|
export function createObjectWithClassField(): ObjectFieldClassInstance
|
|
|
|
|
|
|
|
export function createObjWithProperty(): { value: ArrayBuffer, get getter(): number }
|
|
|
|
|
|
|
|
export function createSymbol(): symbol
|
|
|
|
|
2023-09-14 07:45:14 +09:00
|
|
|
export function createSymbolFor(desc: string): symbol
|
|
|
|
|
2023-04-06 12:04:53 +09:00
|
|
|
/** You could break the step and for an new continuous value. */
|
|
|
|
export const enum CustomNumEnum {
|
|
|
|
One = 1,
|
|
|
|
Two = 2,
|
|
|
|
Three = 3,
|
|
|
|
Four = 4,
|
|
|
|
Six = 6,
|
|
|
|
Eight = 8,
|
|
|
|
Nine = 9,
|
|
|
|
Ten = 10
|
2022-05-10 22:46:16 +09:00
|
|
|
}
|
2023-04-06 12:04:53 +09:00
|
|
|
|
|
|
|
export function customStatusCode(): void
|
|
|
|
|
|
|
|
export interface Dates {
|
|
|
|
start: Date
|
|
|
|
end?: Date
|
2022-03-21 17:36:06 +09:00
|
|
|
}
|
2023-04-06 12:04:53 +09:00
|
|
|
|
|
|
|
export function dateToNumber(input: Date): number
|
|
|
|
|
|
|
|
/** This is a const */
|
|
|
|
export const DEFAULT_COST: number
|
|
|
|
|
|
|
|
export function derefUint8Array(a: Uint8Array, b: Uint8ClampedArray): number
|
|
|
|
|
|
|
|
export function either3(input: string | number | boolean): number
|
|
|
|
|
|
|
|
export function either4(input: string | number | boolean | Obj): number
|
|
|
|
|
|
|
|
export function eitherBoolOrFunction(input: boolean | ((...args: any[]) => any)): void
|
|
|
|
|
|
|
|
export function eitherFromObjects(input: A | B | C): string
|
|
|
|
|
|
|
|
export function eitherFromOption(): JsClassForEither | undefined
|
|
|
|
|
|
|
|
export function eitherStringOrNumber(input: string | number): number
|
|
|
|
|
|
|
|
export const enum Empty {
|
|
|
|
|
2022-03-21 17:36:06 +09:00
|
|
|
}
|
2023-04-06 12:04:53 +09:00
|
|
|
|
|
|
|
export function enumToI32(e: CustomNumEnum): number
|
|
|
|
|
|
|
|
export function fibonacci(n: number): number
|
|
|
|
|
|
|
|
export function fnReceivedAliased(s: AliasedStruct, e: ALIAS): void
|
|
|
|
|
|
|
|
export function getBuffer(): Buffer
|
|
|
|
|
|
|
|
export function getCwd(callback: (arg0: string) => void): void
|
|
|
|
|
|
|
|
export function getEmptyBuffer(): Buffer
|
|
|
|
|
|
|
|
export function getExternal(external: ExternalObject<number>): number
|
|
|
|
|
|
|
|
export function getGlobal(): typeof global
|
|
|
|
|
|
|
|
export function getMapping(): Record<string, number>
|
|
|
|
|
2023-11-06 12:03:44 +09:00
|
|
|
export function getModuleFileName(): string
|
|
|
|
|
2023-04-06 12:04:53 +09:00
|
|
|
export function getNestedNumArr(): number[][][]
|
|
|
|
|
|
|
|
export function getNull(): null
|
|
|
|
|
|
|
|
export function getNumArr(): number[]
|
|
|
|
|
|
|
|
/** Gets some numbers */
|
|
|
|
export function getNums(): Array<number>
|
|
|
|
|
|
|
|
export function getPackageJsonName(packageJson: PackageJson): string
|
|
|
|
|
|
|
|
export function getStrFromObject(): void
|
|
|
|
|
|
|
|
export function getterFromObj(): number
|
|
|
|
|
|
|
|
export function getUndefined(): void
|
|
|
|
|
|
|
|
export function getWords(): Array<string>
|
|
|
|
|
|
|
|
/** default enum values are continuos i32s start from 0 */
|
|
|
|
export const enum Kind {
|
|
|
|
/** Barks */
|
|
|
|
Dog = 0,
|
|
|
|
/** Kills birds */
|
|
|
|
Cat = 1,
|
|
|
|
/** Tasty */
|
|
|
|
Duck = 2
|
2022-04-26 19:06:52 +09:00
|
|
|
}
|
2023-04-06 12:04:53 +09:00
|
|
|
|
|
|
|
export function listObjKeys(obj: object): Array<string>
|
|
|
|
|
|
|
|
export function mapOption(val?: number | undefined | null): number | null
|
|
|
|
|
|
|
|
export function mutateExternal(external: ExternalObject<number>, newVal: number): void
|
|
|
|
|
|
|
|
export function mutateTypedArray(input: Float32Array): void
|
|
|
|
|
|
|
|
export interface Obj {
|
|
|
|
v: string | number
|
2022-05-03 09:27:18 +09:00
|
|
|
}
|
2023-04-06 12:04:53 +09:00
|
|
|
|
|
|
|
export interface ObjectFieldClassInstance {
|
|
|
|
bird: Bird
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ObjectOnlyFromJs {
|
|
|
|
count: number
|
|
|
|
callback: (err: Error | null, value: number) => any
|
|
|
|
}
|
|
|
|
|
|
|
|
export function optionEnd(callback: (arg0: string, arg1?: string | undefined | null) => void): void
|
|
|
|
|
|
|
|
export function optionOnly(callback: (arg0?: string | undefined | null) => void): void
|
|
|
|
|
|
|
|
export function optionStart(callback: (arg0: string | undefined | null, arg1: string) => void): void
|
|
|
|
|
|
|
|
export function optionStartEnd(callback: (arg0: string | undefined | null, arg1: string, arg2?: string | undefined | null) => void): void
|
|
|
|
|
|
|
|
export function overrideIndividualArgOnFunction(notOverridden: string, f: () => string, notOverridden2: number): string
|
|
|
|
|
|
|
|
export function overrideIndividualArgOnFunctionWithCbArg(callback: (town: string, name?: string | undefined | null) => string, notOverridden: number): object
|
|
|
|
|
|
|
|
/** This is an interface for package.json */
|
|
|
|
export interface PackageJson {
|
|
|
|
name: string
|
|
|
|
/** The version of the package */
|
|
|
|
version: string
|
|
|
|
dependencies?: Record<string, any>
|
|
|
|
devDependencies?: Record<string, any>
|
2022-04-26 19:06:52 +09:00
|
|
|
}
|
2023-04-06 12:04:53 +09:00
|
|
|
|
|
|
|
export function panic(): void
|
|
|
|
|
|
|
|
export function plusOne(this: Width): number
|
|
|
|
|
|
|
|
export function promiseInEither(input: number | Promise<number>): Promise<boolean>
|
|
|
|
|
|
|
|
/** napi = { version = 2, features = ["serde-json"] } */
|
|
|
|
export function readFile(callback: (arg0: Error | undefined, arg1?: string | undefined | null) => void): void
|
|
|
|
|
|
|
|
export function readFileAsync(path: string): Promise<Buffer>
|
|
|
|
|
|
|
|
export function readPackageJson(): PackageJson
|
|
|
|
|
|
|
|
export function receiveAllOptionalObject(obj?: AllOptionalObject | undefined | null): void
|
|
|
|
|
|
|
|
export function receiveClassOrNumber(either: number | JsClassForEither): number
|
|
|
|
|
|
|
|
export function receiveDifferentClass(either: JsClassForEither | AnotherClassForEither): number
|
|
|
|
|
|
|
|
export function receiveMutClassOrNumber(either: number | JsClassForEither): number
|
|
|
|
|
|
|
|
export function receiveObjectOnlyFromJs(obj: { count: number, callback: (err: Error | null, count: number) => void }): void
|
|
|
|
|
|
|
|
export function receiveObjectWithClassField(object: ObjectFieldClassInstance): Bird
|
|
|
|
|
|
|
|
export function receiveStrictObject(strictObject: StrictObject): void
|
|
|
|
|
|
|
|
export function receiveString(s: string): string
|
|
|
|
|
|
|
|
export function returnEither(input: number): string | number
|
|
|
|
|
|
|
|
export function returnEitherClass(input: number): number | JsClassForEither
|
|
|
|
|
|
|
|
export function returnFromSharedCrate(): Shared
|
|
|
|
|
|
|
|
export function returnJsFunction(): (...args: any[]) => any
|
|
|
|
|
|
|
|
export function returnNull(): null
|
|
|
|
|
|
|
|
export function returnUndefined(): void
|
|
|
|
|
|
|
|
export function returnUndefinedIfInvalid(input: boolean): boolean
|
|
|
|
|
|
|
|
export function returnUndefinedIfInvalidPromise(input: Promise<boolean>): Promise<boolean>
|
|
|
|
|
|
|
|
export function roundtripStr(s: string): string
|
|
|
|
|
|
|
|
export function runScript(script: string): unknown
|
|
|
|
|
|
|
|
export function setSymbolInObj(symbol: symbol): object
|
|
|
|
|
|
|
|
export const enum Status {
|
|
|
|
Pristine = 'Pristine',
|
|
|
|
Loading = 'Loading',
|
|
|
|
Ready = 'Ready'
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface StrictObject {
|
|
|
|
name: string
|
|
|
|
}
|
|
|
|
|
|
|
|
export function sumMapping(nums: Record<string, number>): number
|
|
|
|
|
|
|
|
export function sumNums(nums: Array<number>): number
|
|
|
|
|
|
|
|
export function testSerdeBigNumberPrecision(number: string): any
|
|
|
|
|
|
|
|
export function testSerdeRoundtrip(data: any): any
|
|
|
|
|
|
|
|
export function threadsafeFunctionClosureCapture(func: (...args: any[]) => any): void
|
|
|
|
|
|
|
|
export function threadsafeFunctionFatalMode(cb: (...args: any[]) => any): void
|
|
|
|
|
|
|
|
export function threadsafeFunctionFatalModeError(cb: (...args: any[]) => any): void
|
|
|
|
|
|
|
|
export function threadsafeFunctionThrowError(cb: (...args: any[]) => any): void
|
|
|
|
|
2023-07-15 13:07:14 +09:00
|
|
|
export function throwAsyncError(): Promise<void>
|
|
|
|
|
2023-04-06 12:04:53 +09:00
|
|
|
export function throwError(): void
|
|
|
|
|
2023-11-06 12:03:44 +09:00
|
|
|
export function throwSyntaxError(error: string, code?: string | undefined | null): void
|
|
|
|
|
2023-04-06 12:04:53 +09:00
|
|
|
export function toJsObj(): object
|
|
|
|
|
|
|
|
export function tsfnAsyncCall(func: (...args: any[]) => any): Promise<void>
|
|
|
|
|
|
|
|
export function tsfnCallWithCallback(func: (...args: any[]) => any): void
|
|
|
|
|
|
|
|
export function tsfnReturnPromise(func: (err: Error | null, value: number) => any): Promise<number>
|
|
|
|
|
|
|
|
export function tsfnReturnPromiseTimeout(func: (err: Error | null, value: number) => any): Promise<number>
|
|
|
|
|
2023-04-10 18:02:13 +09:00
|
|
|
export function tsfnThrowFromJs(tsfn: (err: Error | null, value: number) => any): Promise<number>
|
|
|
|
|
2023-04-06 12:04:53 +09:00
|
|
|
export function tsRename(a: { foo: number }): string[]
|
|
|
|
|
|
|
|
export interface TsTypeChanged {
|
|
|
|
typeOverride: object
|
|
|
|
typeOverrideOptional?: object
|
|
|
|
}
|
|
|
|
|
|
|
|
export function validateArray(arr: Array<number>): number
|
|
|
|
|
|
|
|
export function validateBigint(input: bigint): bigint
|
|
|
|
|
|
|
|
export function validateBoolean(i: boolean): boolean
|
|
|
|
|
|
|
|
export function validateBuffer(b: Buffer): number
|
|
|
|
|
|
|
|
export function validateDate(d: Date): number
|
|
|
|
|
|
|
|
export function validateDateTime(d: Date): number
|
|
|
|
|
|
|
|
export function validateExternal(e: ExternalObject<number>): number
|
|
|
|
|
|
|
|
export function validateFunction(cb: () => number): number
|
|
|
|
|
|
|
|
export function validateHashMap(input: Record<string, number>): number
|
|
|
|
|
|
|
|
export function validateNull(i: null): boolean
|
|
|
|
|
|
|
|
export function validateNumber(i: number): number
|
|
|
|
|
|
|
|
export function validateOptional(input1?: string | undefined | null, input2?: boolean | undefined | null): boolean
|
|
|
|
|
|
|
|
export function validatePromise(p: Promise<number>): Promise<number>
|
|
|
|
|
|
|
|
export function validateString(s: string): string
|
|
|
|
|
|
|
|
export function validateSymbol(s: symbol): boolean
|
|
|
|
|
|
|
|
export function validateTypedArray(input: Uint8Array): number
|
|
|
|
|
|
|
|
export function validateUndefined(i: undefined): boolean
|
|
|
|
|
|
|
|
export function withAbortController(a: number, b: number, signal: AbortSignal): Promise<number>
|
|
|
|
|
|
|
|
export function withoutAbortController(a: number, b: number): Promise<number>
|
|
|
|
|
|
|
|
export function xxh64Alias(input: Buffer): bigint
|
|
|
|
|
|
|
|
export namespace xxh2 {
|
|
|
|
export function xxh2Plus(a: number, b: number): number
|
|
|
|
export function xxh3Xxh64Alias(input: Buffer): bigint
|
|
|
|
}
|
|
|
|
|
2021-11-23 20:00:31 +09:00
|
|
|
export namespace xxh3 {
|
2021-11-29 13:54:45 +09:00
|
|
|
/** Xxh3 class */
|
2021-11-23 20:00:31 +09:00
|
|
|
export class Xxh3 {
|
|
|
|
constructor()
|
2021-11-29 13:54:45 +09:00
|
|
|
/** update */
|
2021-11-23 20:00:31 +09:00
|
|
|
update(input: Buffer): void
|
2022-01-06 23:33:34 +09:00
|
|
|
digest(): bigint
|
2021-11-23 20:00:31 +09:00
|
|
|
}
|
2023-04-06 12:04:53 +09:00
|
|
|
export const ALIGNMENT: number
|
|
|
|
/** xxh128 function */
|
|
|
|
export function xxh128(input: Buffer): bigint
|
|
|
|
export function xxh3_64(input: Buffer): bigint
|
2021-11-23 20:00:31 +09:00
|
|
|
}
|
2023-04-06 12:04:53 +09:00
|
|
|
|