@napi-rs/cli 3.0.0-alpha.55 → 3.0.0-alpha.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/build.js +17 -10
- package/dist/api/build.js.map +1 -1
- package/dist/def/artifacts.d.ts +2 -2
- package/dist/def/build.d.ts +2 -2
- package/dist/def/build.js +2 -2
- package/dist/def/create-npm-dirs.d.ts +1 -1
- package/dist/def/new.d.ts +2 -2
- package/dist/def/pre-publish.d.ts +3 -3
- package/dist/def/rename.d.ts +6 -6
- package/dist/def/universalize.d.ts +1 -1
- package/dist/def/version.d.ts +1 -1
- package/dist/index.cjs +890 -16073
- package/dist/utils/misc.d.ts +0 -1
- package/dist/utils/target.d.ts +0 -1
- package/dist/utils/typegen.js +16 -7
- package/dist/utils/typegen.js.map +1 -1
- package/package.json +5 -5
- package/src/api/build.ts +40 -32
- package/src/def/build.ts +4 -4
- package/src/utils/__tests__/__fixtures__/napi_type_def +130 -130
- package/src/utils/__tests__/__snapshots__/config.spec.ts.snap +0 -0
- package/src/utils/__tests__/__snapshots__/target.spec.ts.snap +0 -0
- package/src/utils/__tests__/__snapshots__/typegen.spec.ts.md +316 -316
- package/src/utils/__tests__/__snapshots__/typegen.spec.ts.snap +0 -0
- package/src/utils/__tests__/__snapshots__/version.spec.ts.snap +0 -0
- package/src/utils/typegen.ts +19 -6
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
{"kind": "const", "name": "DEFAULT_COST", "js_doc": "/** This is a const */\n", "def": "export const DEFAULT_COST: number", "original_name": "DEFAULT_COST"}
|
|
2
|
-
{"kind": "fn", "name": "getWords", "js_doc": "", "def": "
|
|
3
|
-
{"kind": "fn", "name": "getNums", "js_doc": "/** Gets some numbers */\n", "def": "
|
|
4
|
-
{"kind": "fn", "name": "sumNums", "js_doc": "", "def": "
|
|
5
|
-
{"kind": "fn", "name": "toJsObj", "js_doc": "", "def": "
|
|
6
|
-
{"kind": "fn", "name": "getNumArr", "js_doc": "", "def": "
|
|
7
|
-
{"kind": "fn", "name": "getNestedNumArr", "js_doc": "", "def": "
|
|
8
|
-
{"kind": "fn", "name": "readFileAsync", "js_doc": "", "def": "
|
|
9
|
-
{"kind": "fn", "name": "asyncMultiTwo", "js_doc": "", "def": "
|
|
10
|
-
{"kind": "fn", "name": "bigintAdd", "js_doc": "", "def": "
|
|
11
|
-
{"kind": "fn", "name": "createBigInt", "js_doc": "", "def": "
|
|
12
|
-
{"kind": "fn", "name": "createBigIntI64", "js_doc": "", "def": "
|
|
13
|
-
{"kind": "fn", "name": "bigintGetU64AsString", "js_doc": "", "def": "
|
|
14
|
-
{"kind": "fn", "name": "bigintFromI64", "js_doc": "", "def": "
|
|
15
|
-
{"kind": "fn", "name": "bigintFromI128", "js_doc": "", "def": "
|
|
16
|
-
{"kind": "fn", "name": "getCwd", "js_doc": "", "def": "
|
|
17
|
-
{"kind": "fn", "name": "optionEnd", "js_doc": "", "def": "
|
|
18
|
-
{"kind": "fn", "name": "optionStart", "js_doc": "", "def": "
|
|
19
|
-
{"kind": "fn", "name": "optionStartEnd", "js_doc": "", "def": "
|
|
20
|
-
{"kind": "fn", "name": "optionOnly", "js_doc": "", "def": "
|
|
21
|
-
{"kind": "fn", "name": "readFile", "js_doc": "/** napi = { version = 2, features = [\"serde-json\"] } */\n", "def": "
|
|
22
|
-
{"kind": "fn", "name": "returnJsFunction", "js_doc": "", "def": "
|
|
23
|
-
{"kind": "fn", "name": "callbackReturnPromise", "js_doc": "", "def": "
|
|
24
|
-
{"kind": "fn", "name": "captureErrorInCallback", "js_doc": "", "def": "
|
|
2
|
+
{"kind": "fn", "name": "getWords", "js_doc": "", "def": "function getWords(): Array<string>"}
|
|
3
|
+
{"kind": "fn", "name": "getNums", "js_doc": "/** Gets some numbers */\n", "def": "function getNums(): Array<number>"}
|
|
4
|
+
{"kind": "fn", "name": "sumNums", "js_doc": "", "def": "function sumNums(nums: Array<number>): number"}
|
|
5
|
+
{"kind": "fn", "name": "toJsObj", "js_doc": "", "def": "function toJsObj(): object"}
|
|
6
|
+
{"kind": "fn", "name": "getNumArr", "js_doc": "", "def": "function getNumArr(): number[]"}
|
|
7
|
+
{"kind": "fn", "name": "getNestedNumArr", "js_doc": "", "def": "function getNestedNumArr(): number[][][]"}
|
|
8
|
+
{"kind": "fn", "name": "readFileAsync", "js_doc": "", "def": "function readFileAsync(path: string): Promise<Buffer>"}
|
|
9
|
+
{"kind": "fn", "name": "asyncMultiTwo", "js_doc": "", "def": "function asyncMultiTwo(arg: number): Promise<number>"}
|
|
10
|
+
{"kind": "fn", "name": "bigintAdd", "js_doc": "", "def": "function bigintAdd(a: bigint, b: bigint): bigint"}
|
|
11
|
+
{"kind": "fn", "name": "createBigInt", "js_doc": "", "def": "function createBigInt(): bigint"}
|
|
12
|
+
{"kind": "fn", "name": "createBigIntI64", "js_doc": "", "def": "function createBigIntI64(): bigint"}
|
|
13
|
+
{"kind": "fn", "name": "bigintGetU64AsString", "js_doc": "", "def": "function bigintGetU64AsString(bi: bigint): string"}
|
|
14
|
+
{"kind": "fn", "name": "bigintFromI64", "js_doc": "", "def": "function bigintFromI64(): bigint"}
|
|
15
|
+
{"kind": "fn", "name": "bigintFromI128", "js_doc": "", "def": "function bigintFromI128(): bigint"}
|
|
16
|
+
{"kind": "fn", "name": "getCwd", "js_doc": "", "def": "function getCwd(callback: (arg0: string) => void): void"}
|
|
17
|
+
{"kind": "fn", "name": "optionEnd", "js_doc": "", "def": "function optionEnd(callback: (arg0: string, arg1?: string | undefined | null) => void): void"}
|
|
18
|
+
{"kind": "fn", "name": "optionStart", "js_doc": "", "def": "function optionStart(callback: (arg0: string | undefined | null, arg1: string) => void): void"}
|
|
19
|
+
{"kind": "fn", "name": "optionStartEnd", "js_doc": "", "def": "function optionStartEnd(callback: (arg0: string | undefined | null, arg1: string, arg2?: string | undefined | null) => void): void"}
|
|
20
|
+
{"kind": "fn", "name": "optionOnly", "js_doc": "", "def": "function optionOnly(callback: (arg0?: string | undefined | null) => void): void"}
|
|
21
|
+
{"kind": "fn", "name": "readFile", "js_doc": "/** napi = { version = 2, features = [\"serde-json\"] } */\n", "def": "function readFile(callback: (arg0: Error | undefined, arg1?: string | undefined | null) => void): void"}
|
|
22
|
+
{"kind": "fn", "name": "returnJsFunction", "js_doc": "", "def": "function returnJsFunction(): (...args: any[]) => any"}
|
|
23
|
+
{"kind": "fn", "name": "callbackReturnPromise", "js_doc": "", "def": "function callbackReturnPromise<T>(functionInput: () => T | Promise<T>, callback: (err: Error | null, result: T) => void): T | Promise<T>"}
|
|
24
|
+
{"kind": "fn", "name": "captureErrorInCallback", "js_doc": "", "def": "function captureErrorInCallback(cb1: () => void, cb2: (arg0: Error) => void): void"}
|
|
25
25
|
{"kind": "struct", "name": "Animal", "js_doc": "/**\n * `constructor` option for `struct` requires all fields to be public,\n * otherwise tag impl fn as constructor\n * #[napi(constructor)]\n */\n", "def": "/** Kind of animal */\nreadonly kind: Kind", "original_name": "Animal"}
|
|
26
26
|
{"kind": "impl", "name": "Animal", "js_doc": "", "def": "/** This is the constructor */\n constructor(kind: Kind, name: string)\n/** This is a factory method */\nstatic withKind(kind: Kind): Animal\nget name(): string\nset name(name: string)\nget type(): Kind\nset type(kind: Kind)\n/**\n * This is a\n * multi-line comment\n * with an emoji \uD83D\uDE80\n */\n whoami(): string\n/** This is static... */\nstatic getDogKind(): Kind\n/**\n * Here are some characters and character sequences\n * that should be escaped correctly:\n * \\[]{}/\\:\"\"{\n * }\n */\n returnOtherClass(): Dog\n returnOtherClassWithCustomConstructor(): Bird\n overrideIndividualArgOnMethod(normalTy: string, overriddenTy: {n: string}): Bird"}
|
|
27
27
|
{"kind": "struct", "name": "Dog", "js_doc": "", "def": "name: string\nconstructor(name: string)", "original_name": "Dog"}
|
|
@@ -43,74 +43,74 @@
|
|
|
43
43
|
{"kind": "struct", "name": "Optional", "js_doc": "", "def": "", "original_name": "Optional"}
|
|
44
44
|
{"kind": "impl", "name": "Optional", "js_doc": "", "def": "static optionEnd(required: string, optional?: string | undefined | null): string\nstatic optionStart(optional: string | undefined | null, required: string): string\nstatic optionStartEnd(optional1: string | undefined | null, required: string, optional2?: string | undefined | null): string\nstatic optionOnly(optional?: string | undefined | null): string"}
|
|
45
45
|
{"kind": "interface", "name": "ObjectFieldClassInstance", "js_doc": "", "def": "bird: Bird", "original_name": "ObjectFieldClassInstance"}
|
|
46
|
-
{"kind": "fn", "name": "createObjectWithClassField", "js_doc": "", "def": "
|
|
47
|
-
{"kind": "fn", "name": "receiveObjectWithClassField", "js_doc": "", "def": "
|
|
46
|
+
{"kind": "fn", "name": "createObjectWithClassField", "js_doc": "", "def": "function createObjectWithClassField(): ObjectFieldClassInstance"}
|
|
47
|
+
{"kind": "fn", "name": "receiveObjectWithClassField", "js_doc": "", "def": "function receiveObjectWithClassField(object: ObjectFieldClassInstance): Bird"}
|
|
48
48
|
{"kind": "struct", "name": "NotWritableClass", "js_doc": "", "def": "name: string\nconstructor(name: string)", "original_name": "NotWritableClass"}
|
|
49
49
|
{"kind": "impl", "name": "NotWritableClass", "js_doc": "", "def": " setName(name: string): void"}
|
|
50
50
|
{"kind": "struct", "name": "CustomFinalize", "js_doc": "", "def": "", "original_name": "CustomFinalize"}
|
|
51
51
|
{"kind": "impl", "name": "CustomFinalize", "js_doc": "", "def": " constructor(width: number, height: number)"}
|
|
52
52
|
{"kind": "struct", "name": "Width", "js_doc": "", "def": "value: number\nconstructor(value: number)", "original_name": "Width"}
|
|
53
|
-
{"kind": "fn", "name": "plusOne", "js_doc": "", "def": "
|
|
53
|
+
{"kind": "fn", "name": "plusOne", "js_doc": "", "def": "function plusOne(this: Width): number"}
|
|
54
54
|
{"kind": "struct", "name": "ClassWithFactory", "js_doc": "", "def": "name: string", "original_name": "ClassWithFactory"}
|
|
55
55
|
{"kind": "impl", "name": "ClassWithFactory", "js_doc": "", "def": "static withName(name: string): ClassWithFactory\n setName(name: string): this"}
|
|
56
|
-
{"kind": "fn", "name": "dateToNumber", "js_doc": "", "def": "
|
|
57
|
-
{"kind": "fn", "name": "chronoDateToMillis", "js_doc": "", "def": "
|
|
58
|
-
{"kind": "fn", "name": "chronoDateAdd1Minute", "js_doc": "", "def": "
|
|
56
|
+
{"kind": "fn", "name": "dateToNumber", "js_doc": "", "def": "function dateToNumber(input: Date): number"}
|
|
57
|
+
{"kind": "fn", "name": "chronoDateToMillis", "js_doc": "", "def": "function chronoDateToMillis(input: Date): number"}
|
|
58
|
+
{"kind": "fn", "name": "chronoDateAdd1Minute", "js_doc": "", "def": "function chronoDateAdd1Minute(input: Date): Date"}
|
|
59
59
|
{"kind": "interface", "name": "Dates", "js_doc": "", "def": "start: Date\nend?: Date", "original_name": "Dates"}
|
|
60
|
-
{"kind": "fn", "name": "eitherStringOrNumber", "js_doc": "", "def": "
|
|
61
|
-
{"kind": "fn", "name": "returnEither", "js_doc": "", "def": "
|
|
62
|
-
{"kind": "fn", "name": "either3", "js_doc": "", "def": "
|
|
60
|
+
{"kind": "fn", "name": "eitherStringOrNumber", "js_doc": "", "def": "function eitherStringOrNumber(input: string | number): number"}
|
|
61
|
+
{"kind": "fn", "name": "returnEither", "js_doc": "", "def": "function returnEither(input: number): string | number"}
|
|
62
|
+
{"kind": "fn", "name": "either3", "js_doc": "", "def": "function either3(input: string | number | boolean): number"}
|
|
63
63
|
{"kind": "interface", "name": "Obj", "js_doc": "", "def": "v: string | number", "original_name": "Obj"}
|
|
64
|
-
{"kind": "fn", "name": "either4", "js_doc": "", "def": "
|
|
64
|
+
{"kind": "fn", "name": "either4", "js_doc": "", "def": "function either4(input: string | number | boolean | Obj): number"}
|
|
65
65
|
{"kind": "struct", "name": "JsClassForEither", "js_doc": "", "def": "", "original_name": "JsClassForEither"}
|
|
66
66
|
{"kind": "impl", "name": "JsClassForEither", "js_doc": "", "def": " constructor()"}
|
|
67
67
|
{"kind": "struct", "name": "AnotherClassForEither", "js_doc": "", "def": "", "original_name": "AnotherClassForEither"}
|
|
68
68
|
{"kind": "impl", "name": "AnotherClassForEither", "js_doc": "", "def": " constructor()"}
|
|
69
|
-
{"kind": "fn", "name": "receiveClassOrNumber", "js_doc": "", "def": "
|
|
70
|
-
{"kind": "fn", "name": "receiveMutClassOrNumber", "js_doc": "", "def": "
|
|
71
|
-
{"kind": "fn", "name": "receiveDifferentClass", "js_doc": "", "def": "
|
|
72
|
-
{"kind": "fn", "name": "returnEitherClass", "js_doc": "", "def": "
|
|
73
|
-
{"kind": "fn", "name": "eitherFromOption", "js_doc": "", "def": "
|
|
69
|
+
{"kind": "fn", "name": "receiveClassOrNumber", "js_doc": "", "def": "function receiveClassOrNumber(either: number | JsClassForEither): number"}
|
|
70
|
+
{"kind": "fn", "name": "receiveMutClassOrNumber", "js_doc": "", "def": "function receiveMutClassOrNumber(either: number | JsClassForEither): number"}
|
|
71
|
+
{"kind": "fn", "name": "receiveDifferentClass", "js_doc": "", "def": "function receiveDifferentClass(either: JsClassForEither | AnotherClassForEither): number"}
|
|
72
|
+
{"kind": "fn", "name": "returnEitherClass", "js_doc": "", "def": "function returnEitherClass(input: number): number | JsClassForEither"}
|
|
73
|
+
{"kind": "fn", "name": "eitherFromOption", "js_doc": "", "def": "function eitherFromOption(): JsClassForEither | undefined"}
|
|
74
74
|
{"kind": "interface", "name": "A", "js_doc": "", "def": "foo: number", "original_name": "A"}
|
|
75
75
|
{"kind": "interface", "name": "B", "js_doc": "", "def": "bar: number", "original_name": "B"}
|
|
76
76
|
{"kind": "interface", "name": "C", "js_doc": "", "def": "baz: number", "original_name": "C"}
|
|
77
|
-
{"kind": "fn", "name": "eitherFromObjects", "js_doc": "", "def": "
|
|
78
|
-
{"kind": "fn", "name": "eitherBoolOrFunction", "js_doc": "", "def": "
|
|
79
|
-
{"kind": "fn", "name": "promiseInEither", "js_doc": "", "def": "
|
|
77
|
+
{"kind": "fn", "name": "eitherFromObjects", "js_doc": "", "def": "function eitherFromObjects(input: A | B | C): string"}
|
|
78
|
+
{"kind": "fn", "name": "eitherBoolOrFunction", "js_doc": "", "def": "function eitherBoolOrFunction(input: boolean | ((...args: any[]) => any)): void"}
|
|
79
|
+
{"kind": "fn", "name": "promiseInEither", "js_doc": "", "def": "function promiseInEither(input: number | Promise<number>): Promise<boolean>"}
|
|
80
80
|
{"kind": "enum", "name": "Kind", "js_doc": "/** default enum values are continuos i32s start from 0 */\n", "def": "/** Barks */\nDog = 0,\n /** Kills birds */\nCat = 1,\n /** Tasty */\nDuck = 2", "original_name": "Kind"}
|
|
81
81
|
{"kind": "enum", "name": "Empty", "js_doc": "", "def": "", "original_name": "Empty"}
|
|
82
82
|
{"kind": "enum", "name": "CustomNumEnum", "js_doc": "/** You could break the step and for an new continuous value. */\n", "def": "One = 1,\n Two = 2,\n Three = 3,\n Four = 4,\n Six = 6,\n Eight = 8,\n Nine = 9,\n Ten = 10", "original_name": "CustomNumEnum"}
|
|
83
|
-
{"kind": "fn", "name": "enumToI32", "js_doc": "", "def": "
|
|
84
|
-
{"kind": "fn", "name": "throwError", "js_doc": "", "def": "
|
|
85
|
-
{"kind": "fn", "name": "panic", "js_doc": "", "def": "
|
|
86
|
-
{"kind": "fn", "name": "receiveString", "js_doc": "", "def": "
|
|
87
|
-
{"kind": "fn", "name": "customStatusCode", "js_doc": "", "def": "
|
|
88
|
-
{"kind": "fn", "name": "createExternal", "js_doc": "", "def": "
|
|
89
|
-
{"kind": "fn", "name": "createExternalString", "js_doc": "", "def": "
|
|
90
|
-
{"kind": "fn", "name": "getExternal", "js_doc": "", "def": "
|
|
91
|
-
{"kind": "fn", "name": "mutateExternal", "js_doc": "", "def": "
|
|
92
|
-
{"kind": "fn", "name": "validateArray", "js_doc": "", "def": "
|
|
93
|
-
{"kind": "fn", "name": "validateBuffer", "js_doc": "", "def": "
|
|
94
|
-
{"kind": "fn", "name": "validateTypedArray", "js_doc": "", "def": "
|
|
95
|
-
{"kind": "fn", "name": "validateBigint", "js_doc": "", "def": "
|
|
96
|
-
{"kind": "fn", "name": "validateBoolean", "js_doc": "", "def": "
|
|
97
|
-
{"kind": "fn", "name": "validateDate", "js_doc": "", "def": "
|
|
98
|
-
{"kind": "fn", "name": "validateDateTime", "js_doc": "", "def": "
|
|
99
|
-
{"kind": "fn", "name": "validateExternal", "js_doc": "", "def": "
|
|
100
|
-
{"kind": "fn", "name": "validateFunction", "js_doc": "", "def": "
|
|
101
|
-
{"kind": "fn", "name": "validateHashMap", "js_doc": "", "def": "
|
|
102
|
-
{"kind": "fn", "name": "validateNull", "js_doc": "", "def": "
|
|
103
|
-
{"kind": "fn", "name": "validateUndefined", "js_doc": "", "def": "
|
|
104
|
-
{"kind": "fn", "name": "validateNumber", "js_doc": "", "def": "
|
|
105
|
-
{"kind": "fn", "name": "validatePromise", "js_doc": "", "def": "
|
|
106
|
-
{"kind": "fn", "name": "validateString", "js_doc": "", "def": "
|
|
107
|
-
{"kind": "fn", "name": "validateSymbol", "js_doc": "", "def": "
|
|
108
|
-
{"kind": "fn", "name": "validateOptional", "js_doc": "", "def": "
|
|
109
|
-
{"kind": "fn", "name": "returnUndefinedIfInvalid", "js_doc": "", "def": "
|
|
110
|
-
{"kind": "fn", "name": "returnUndefinedIfInvalidPromise", "js_doc": "", "def": "
|
|
111
|
-
{"kind": "fn", "name": "tsRename", "js_doc": "", "def": "
|
|
112
|
-
{"kind": "fn", "name": "overrideIndividualArgOnFunction", "js_doc": "", "def": "
|
|
113
|
-
{"kind": "fn", "name": "overrideIndividualArgOnFunctionWithCbArg", "js_doc": "", "def": "
|
|
83
|
+
{"kind": "fn", "name": "enumToI32", "js_doc": "", "def": "function enumToI32(e: CustomNumEnum): number"}
|
|
84
|
+
{"kind": "fn", "name": "throwError", "js_doc": "", "def": "function throwError(): void"}
|
|
85
|
+
{"kind": "fn", "name": "panic", "js_doc": "", "def": "function panic(): void"}
|
|
86
|
+
{"kind": "fn", "name": "receiveString", "js_doc": "", "def": "function receiveString(s: string): string"}
|
|
87
|
+
{"kind": "fn", "name": "customStatusCode", "js_doc": "", "def": "function customStatusCode(): void"}
|
|
88
|
+
{"kind": "fn", "name": "createExternal", "js_doc": "", "def": "function createExternal(size: number): ExternalObject<number>"}
|
|
89
|
+
{"kind": "fn", "name": "createExternalString", "js_doc": "", "def": "function createExternalString(content: string): ExternalObject<string>"}
|
|
90
|
+
{"kind": "fn", "name": "getExternal", "js_doc": "", "def": "function getExternal(external: ExternalObject<number>): number"}
|
|
91
|
+
{"kind": "fn", "name": "mutateExternal", "js_doc": "", "def": "function mutateExternal(external: ExternalObject<number>, newVal: number): void"}
|
|
92
|
+
{"kind": "fn", "name": "validateArray", "js_doc": "", "def": "function validateArray(arr: Array<number>): number"}
|
|
93
|
+
{"kind": "fn", "name": "validateBuffer", "js_doc": "", "def": "function validateBuffer(b: Buffer): number"}
|
|
94
|
+
{"kind": "fn", "name": "validateTypedArray", "js_doc": "", "def": "function validateTypedArray(input: Uint8Array): number"}
|
|
95
|
+
{"kind": "fn", "name": "validateBigint", "js_doc": "", "def": "function validateBigint(input: bigint): bigint"}
|
|
96
|
+
{"kind": "fn", "name": "validateBoolean", "js_doc": "", "def": "function validateBoolean(i: boolean): boolean"}
|
|
97
|
+
{"kind": "fn", "name": "validateDate", "js_doc": "", "def": "function validateDate(d: Date): number"}
|
|
98
|
+
{"kind": "fn", "name": "validateDateTime", "js_doc": "", "def": "function validateDateTime(d: Date): number"}
|
|
99
|
+
{"kind": "fn", "name": "validateExternal", "js_doc": "", "def": "function validateExternal(e: ExternalObject<number>): number"}
|
|
100
|
+
{"kind": "fn", "name": "validateFunction", "js_doc": "", "def": "function validateFunction(cb: () => number): number"}
|
|
101
|
+
{"kind": "fn", "name": "validateHashMap", "js_doc": "", "def": "function validateHashMap(input: Record<string, number>): number"}
|
|
102
|
+
{"kind": "fn", "name": "validateNull", "js_doc": "", "def": "function validateNull(i: null): boolean"}
|
|
103
|
+
{"kind": "fn", "name": "validateUndefined", "js_doc": "", "def": "function validateUndefined(i: undefined): boolean"}
|
|
104
|
+
{"kind": "fn", "name": "validateNumber", "js_doc": "", "def": "function validateNumber(i: number): number"}
|
|
105
|
+
{"kind": "fn", "name": "validatePromise", "js_doc": "", "def": "function validatePromise(p: Promise<number>): Promise<number>"}
|
|
106
|
+
{"kind": "fn", "name": "validateString", "js_doc": "", "def": "function validateString(s: string): string"}
|
|
107
|
+
{"kind": "fn", "name": "validateSymbol", "js_doc": "", "def": "function validateSymbol(s: symbol): boolean"}
|
|
108
|
+
{"kind": "fn", "name": "validateOptional", "js_doc": "", "def": "function validateOptional(input1?: string | undefined | null, input2?: boolean | undefined | null): boolean"}
|
|
109
|
+
{"kind": "fn", "name": "returnUndefinedIfInvalid", "js_doc": "", "def": "function returnUndefinedIfInvalid(input: boolean): boolean"}
|
|
110
|
+
{"kind": "fn", "name": "returnUndefinedIfInvalidPromise", "js_doc": "", "def": "function returnUndefinedIfInvalidPromise(input: Promise<boolean>): Promise<boolean>"}
|
|
111
|
+
{"kind": "fn", "name": "tsRename", "js_doc": "", "def": "function tsRename(a: { foo: number }): string[]"}
|
|
112
|
+
{"kind": "fn", "name": "overrideIndividualArgOnFunction", "js_doc": "", "def": "function overrideIndividualArgOnFunction(notOverridden: string, f: () => string, notOverridden2: number): string"}
|
|
113
|
+
{"kind": "fn", "name": "overrideIndividualArgOnFunctionWithCbArg", "js_doc": "", "def": "function overrideIndividualArgOnFunctionWithCbArg(callback: (town: string, name?: string | undefined | null) => string, notOverridden: number): object"}
|
|
114
114
|
{"kind": "struct", "name": "Fib", "js_doc": "", "def": "", "original_name": "Fib"}
|
|
115
115
|
{"kind": "impl", "name": "Fib", "js_doc": "", "def": "[Symbol.iterator](): Iterator<number, void, number>"}
|
|
116
116
|
{"kind": "impl", "name": "Fib", "js_doc": "", "def": " constructor()"}
|
|
@@ -120,39 +120,39 @@
|
|
|
120
120
|
{"kind": "struct", "name": "Fib3", "js_doc": "", "def": "current: number\nnext: number\nconstructor(current: number, next: number)", "original_name": "Fib3"}
|
|
121
121
|
{"kind": "impl", "name": "Fib3", "js_doc": "", "def": "[Symbol.iterator](): Iterator<number, void, number>"}
|
|
122
122
|
{"kind": "const", "name": "ALIGNMENT", "js_doc": "", "def": "export const ALIGNMENT: number", "original_name": "ALIGNMENT", "js_mod": "xxh3"}
|
|
123
|
-
{"kind": "fn", "name": "xxh3_64", "js_doc": "", "def": "
|
|
124
|
-
{"kind": "fn", "name": "xxh128", "js_doc": "/** xxh128 function */\n", "def": "
|
|
123
|
+
{"kind": "fn", "name": "xxh3_64", "js_doc": "", "def": "function xxh3_64(input: Buffer): bigint", "js_mod": "xxh3"}
|
|
124
|
+
{"kind": "fn", "name": "xxh128", "js_doc": "/** xxh128 function */\n", "def": "function xxh128(input: Buffer): bigint", "js_mod": "xxh3"}
|
|
125
125
|
{"kind": "struct", "name": "Xxh3", "js_doc": "/** Xxh3 class */\n", "def": "", "original_name": "Xxh3", "js_mod": "xxh3"}
|
|
126
126
|
{"kind": "impl", "name": "Xxh3", "js_doc": "", "def": " constructor()\n/** update */\n update(input: Buffer): void\n digest(): bigint", "js_mod": "xxh3"}
|
|
127
|
-
{"kind": "fn", "name": "xxh2Plus", "js_doc": "", "def": "
|
|
128
|
-
{"kind": "fn", "name": "xxh3Xxh64Alias", "js_doc": "", "def": "
|
|
129
|
-
{"kind": "fn", "name": "xxh64Alias", "js_doc": "", "def": "
|
|
130
|
-
{"kind": "fn", "name": "getMapping", "js_doc": "", "def": "
|
|
131
|
-
{"kind": "fn", "name": "sumMapping", "js_doc": "", "def": "
|
|
132
|
-
{"kind": "fn", "name": "mapOption", "js_doc": "", "def": "
|
|
133
|
-
{"kind": "fn", "name": "returnNull", "js_doc": "", "def": "
|
|
134
|
-
{"kind": "fn", "name": "returnUndefined", "js_doc": "", "def": "
|
|
135
|
-
{"kind": "fn", "name": "add", "js_doc": "", "def": "
|
|
136
|
-
{"kind": "fn", "name": "fibonacci", "js_doc": "", "def": "
|
|
137
|
-
{"kind": "fn", "name": "listObjKeys", "js_doc": "", "def": "
|
|
138
|
-
{"kind": "fn", "name": "createObj", "js_doc": "", "def": "
|
|
139
|
-
{"kind": "fn", "name": "getGlobal", "js_doc": "", "def": "
|
|
140
|
-
{"kind": "fn", "name": "getUndefined", "js_doc": "", "def": "
|
|
141
|
-
{"kind": "fn", "name": "getNull", "js_doc": "", "def": "
|
|
127
|
+
{"kind": "fn", "name": "xxh2Plus", "js_doc": "", "def": "function xxh2Plus(a: number, b: number): number", "js_mod": "xxh2"}
|
|
128
|
+
{"kind": "fn", "name": "xxh3Xxh64Alias", "js_doc": "", "def": "function xxh3Xxh64Alias(input: Buffer): bigint", "js_mod": "xxh2"}
|
|
129
|
+
{"kind": "fn", "name": "xxh64Alias", "js_doc": "", "def": "function xxh64Alias(input: Buffer): bigint"}
|
|
130
|
+
{"kind": "fn", "name": "getMapping", "js_doc": "", "def": "function getMapping(): Record<string, number>"}
|
|
131
|
+
{"kind": "fn", "name": "sumMapping", "js_doc": "", "def": "function sumMapping(nums: Record<string, number>): number"}
|
|
132
|
+
{"kind": "fn", "name": "mapOption", "js_doc": "", "def": "function mapOption(val?: number | undefined | null): number | null"}
|
|
133
|
+
{"kind": "fn", "name": "returnNull", "js_doc": "", "def": "function returnNull(): null"}
|
|
134
|
+
{"kind": "fn", "name": "returnUndefined", "js_doc": "", "def": "function returnUndefined(): void"}
|
|
135
|
+
{"kind": "fn", "name": "add", "js_doc": "", "def": "function add(a: number, b: number): number"}
|
|
136
|
+
{"kind": "fn", "name": "fibonacci", "js_doc": "", "def": "function fibonacci(n: number): number"}
|
|
137
|
+
{"kind": "fn", "name": "listObjKeys", "js_doc": "", "def": "function listObjKeys(obj: object): Array<string>"}
|
|
138
|
+
{"kind": "fn", "name": "createObj", "js_doc": "", "def": "function createObj(): object"}
|
|
139
|
+
{"kind": "fn", "name": "getGlobal", "js_doc": "", "def": "function getGlobal(): typeof global"}
|
|
140
|
+
{"kind": "fn", "name": "getUndefined", "js_doc": "", "def": "function getUndefined(): void"}
|
|
141
|
+
{"kind": "fn", "name": "getNull", "js_doc": "", "def": "function getNull(): null"}
|
|
142
142
|
{"kind": "interface", "name": "AllOptionalObject", "js_doc": "", "def": "name?: string\nage?: number", "original_name": "AllOptionalObject"}
|
|
143
|
-
{"kind": "fn", "name": "receiveAllOptionalObject", "js_doc": "", "def": "
|
|
143
|
+
{"kind": "fn", "name": "receiveAllOptionalObject", "js_doc": "", "def": "function receiveAllOptionalObject(obj?: AllOptionalObject | undefined | null): void"}
|
|
144
144
|
{"kind": "enum", "name": "ALIAS", "js_doc": "", "def": "A = 0,\n B = 1", "original_name": "AliasedEnum"}
|
|
145
145
|
{"kind": "interface", "name": "AliasedStruct", "js_doc": "", "def": "a: ALIAS\nb: number", "original_name": "StructContainsAliasedEnum"}
|
|
146
|
-
{"kind": "fn", "name": "fnReceivedAliased", "js_doc": "", "def": "
|
|
146
|
+
{"kind": "fn", "name": "fnReceivedAliased", "js_doc": "", "def": "function fnReceivedAliased(s: AliasedStruct, e: ALIAS): void"}
|
|
147
147
|
{"kind": "interface", "name": "StrictObject", "js_doc": "", "def": "name: string", "original_name": "StrictObject"}
|
|
148
|
-
{"kind": "fn", "name": "receiveStrictObject", "js_doc": "", "def": "
|
|
149
|
-
{"kind": "fn", "name": "getStrFromObject", "js_doc": "", "def": "
|
|
148
|
+
{"kind": "fn", "name": "receiveStrictObject", "js_doc": "", "def": "function receiveStrictObject(strictObject: StrictObject): void"}
|
|
149
|
+
{"kind": "fn", "name": "getStrFromObject", "js_doc": "", "def": "function getStrFromObject(): void"}
|
|
150
150
|
{"kind": "interface", "name": "TsTypeChanged", "js_doc": "", "def": "typeOverride: object\ntypeOverrideOptional?: object", "original_name": "TsTypeChanged"}
|
|
151
|
-
{"kind": "fn", "name": "createObjWithProperty", "js_doc": "", "def": "
|
|
152
|
-
{"kind": "fn", "name": "getterFromObj", "js_doc": "", "def": "
|
|
151
|
+
{"kind": "fn", "name": "createObjWithProperty", "js_doc": "", "def": "function createObjWithProperty(): { value: ArrayBuffer, get getter(): number }"}
|
|
152
|
+
{"kind": "fn", "name": "getterFromObj", "js_doc": "", "def": "function getterFromObj(): number"}
|
|
153
153
|
{"kind": "interface", "name": "ObjectOnlyFromJs", "js_doc": "", "def": "count: number\ncallback: (err: Error | null, value: number) => any", "original_name": "ObjectOnlyFromJs"}
|
|
154
|
-
{"kind": "fn", "name": "receiveObjectOnlyFromJs", "js_doc": "", "def": "
|
|
155
|
-
{"kind": "fn", "name": "asyncPlus100", "js_doc": "", "def": "
|
|
154
|
+
{"kind": "fn", "name": "receiveObjectOnlyFromJs", "js_doc": "", "def": "function receiveObjectOnlyFromJs(obj: { count: number, callback: (err: Error | null, count: number) => void }): void"}
|
|
155
|
+
{"kind": "fn", "name": "asyncPlus100", "js_doc": "", "def": "function asyncPlus100(p: Promise<number>): Promise<number>"}
|
|
156
156
|
{"kind": "struct", "name": "JsRepo", "js_doc": "", "def": "", "original_name": "JsRepo"}
|
|
157
157
|
{"kind": "impl", "name": "JsRepo", "js_doc": "", "def": " constructor(dir: string)\n remote(): JsRemote"}
|
|
158
158
|
{"kind": "struct", "name": "JsRemote", "js_doc": "", "def": "", "original_name": "JsRemote"}
|
|
@@ -164,38 +164,38 @@
|
|
|
164
164
|
{"kind": "impl", "name": "AnotherCssStyleSheet", "js_doc": "", "def": "get rules(): CssRuleList"}
|
|
165
165
|
{"kind": "impl", "name": "CssStyleSheet", "js_doc": "", "def": " constructor(name: string, rules: Array<string>)\nget rules(): CssRuleList\n anotherCssStyleSheet(): AnotherCssStyleSheet"}
|
|
166
166
|
{"kind": "interface", "name": "PackageJson", "js_doc": "/** This is an interface for package.json */\n", "def": "name: string\n/** The version of the package */\nversion: string\ndependencies?: Record<string, any>\ndevDependencies?: Record<string, any>", "original_name": "PackageJson"}
|
|
167
|
-
{"kind": "fn", "name": "readPackageJson", "js_doc": "", "def": "
|
|
168
|
-
{"kind": "fn", "name": "getPackageJsonName", "js_doc": "", "def": "
|
|
169
|
-
{"kind": "fn", "name": "testSerdeRoundtrip", "js_doc": "", "def": "
|
|
170
|
-
{"kind": "fn", "name": "contains", "js_doc": "", "def": "
|
|
171
|
-
{"kind": "fn", "name": "concatStr", "js_doc": "", "def": "
|
|
172
|
-
{"kind": "fn", "name": "concatUtf16", "js_doc": "", "def": "
|
|
173
|
-
{"kind": "fn", "name": "concatLatin1", "js_doc": "", "def": "
|
|
174
|
-
{"kind": "fn", "name": "roundtripStr", "js_doc": "", "def": "
|
|
175
|
-
{"kind": "fn", "name": "setSymbolInObj", "js_doc": "", "def": "
|
|
176
|
-
{"kind": "fn", "name": "createSymbol", "js_doc": "", "def": "
|
|
167
|
+
{"kind": "fn", "name": "readPackageJson", "js_doc": "", "def": "function readPackageJson(): PackageJson"}
|
|
168
|
+
{"kind": "fn", "name": "getPackageJsonName", "js_doc": "", "def": "function getPackageJsonName(packageJson: PackageJson): string"}
|
|
169
|
+
{"kind": "fn", "name": "testSerdeRoundtrip", "js_doc": "", "def": "function testSerdeRoundtrip(data: any): any"}
|
|
170
|
+
{"kind": "fn", "name": "contains", "js_doc": "", "def": "function contains(source: string, target: string): boolean"}
|
|
171
|
+
{"kind": "fn", "name": "concatStr", "js_doc": "", "def": "function concatStr(s: string): string"}
|
|
172
|
+
{"kind": "fn", "name": "concatUtf16", "js_doc": "", "def": "function concatUtf16(s: string): string"}
|
|
173
|
+
{"kind": "fn", "name": "concatLatin1", "js_doc": "", "def": "function concatLatin1(s: string): string"}
|
|
174
|
+
{"kind": "fn", "name": "roundtripStr", "js_doc": "", "def": "function roundtripStr(s: string): string"}
|
|
175
|
+
{"kind": "fn", "name": "setSymbolInObj", "js_doc": "", "def": "function setSymbolInObj(symbol: symbol): object"}
|
|
176
|
+
{"kind": "fn", "name": "createSymbol", "js_doc": "", "def": "function createSymbol(): symbol"}
|
|
177
177
|
{"kind": "impl", "name": "DelaySum", "js_doc": "", "def": ""}
|
|
178
|
-
{"kind": "fn", "name": "withoutAbortController", "js_doc": "", "def": "
|
|
179
|
-
{"kind": "fn", "name": "withAbortController", "js_doc": "", "def": "
|
|
180
|
-
{"kind": "fn", "name": "callThreadsafeFunction", "js_doc": "", "def": "
|
|
181
|
-
{"kind": "fn", "name": "threadsafeFunctionThrowError", "js_doc": "", "def": "
|
|
182
|
-
{"kind": "fn", "name": "threadsafeFunctionFatalMode", "js_doc": "", "def": "
|
|
183
|
-
{"kind": "fn", "name": "threadsafeFunctionFatalModeError", "js_doc": "", "def": "
|
|
184
|
-
{"kind": "fn", "name": "threadsafeFunctionClosureCapture", "js_doc": "", "def": "
|
|
185
|
-
{"kind": "fn", "name": "tsfnCallWithCallback", "js_doc": "", "def": "
|
|
186
|
-
{"kind": "fn", "name": "tsfnAsyncCall", "js_doc": "", "def": "
|
|
187
|
-
{"kind": "fn", "name": "acceptThreadsafeFunction", "js_doc": "", "def": "
|
|
188
|
-
{"kind": "fn", "name": "acceptThreadsafeFunctionFatal", "js_doc": "", "def": "
|
|
189
|
-
{"kind": "fn", "name": "acceptThreadsafeFunctionTupleArgs", "js_doc": "", "def": "
|
|
190
|
-
{"kind": "fn", "name": "getBuffer", "js_doc": "", "def": "
|
|
191
|
-
{"kind": "fn", "name": "appendBuffer", "js_doc": "", "def": "
|
|
192
|
-
{"kind": "fn", "name": "getEmptyBuffer", "js_doc": "", "def": "
|
|
193
|
-
{"kind": "fn", "name": "convertU32Array", "js_doc": "", "def": "
|
|
194
|
-
{"kind": "fn", "name": "createExternalTypedArray", "js_doc": "", "def": "
|
|
195
|
-
{"kind": "fn", "name": "mutateTypedArray", "js_doc": "", "def": "
|
|
196
|
-
{"kind": "fn", "name": "derefUint8Array", "js_doc": "", "def": "
|
|
197
|
-
{"kind": "fn", "name": "bufferPassThrough", "js_doc": "", "def": "
|
|
198
|
-
{"kind": "fn", "name": "arrayBufferPassThrough", "js_doc": "", "def": "
|
|
178
|
+
{"kind": "fn", "name": "withoutAbortController", "js_doc": "", "def": "function withoutAbortController(a: number, b: number): Promise<number>"}
|
|
179
|
+
{"kind": "fn", "name": "withAbortController", "js_doc": "", "def": "function withAbortController(a: number, b: number, signal: AbortSignal): Promise<number>"}
|
|
180
|
+
{"kind": "fn", "name": "callThreadsafeFunction", "js_doc": "", "def": "function callThreadsafeFunction(callback: (...args: any[]) => any): void"}
|
|
181
|
+
{"kind": "fn", "name": "threadsafeFunctionThrowError", "js_doc": "", "def": "function threadsafeFunctionThrowError(cb: (...args: any[]) => any): void"}
|
|
182
|
+
{"kind": "fn", "name": "threadsafeFunctionFatalMode", "js_doc": "", "def": "function threadsafeFunctionFatalMode(cb: (...args: any[]) => any): void"}
|
|
183
|
+
{"kind": "fn", "name": "threadsafeFunctionFatalModeError", "js_doc": "", "def": "function threadsafeFunctionFatalModeError(cb: (...args: any[]) => any): void"}
|
|
184
|
+
{"kind": "fn", "name": "threadsafeFunctionClosureCapture", "js_doc": "", "def": "function threadsafeFunctionClosureCapture(func: (...args: any[]) => any): void"}
|
|
185
|
+
{"kind": "fn", "name": "tsfnCallWithCallback", "js_doc": "", "def": "function tsfnCallWithCallback(func: (...args: any[]) => any): void"}
|
|
186
|
+
{"kind": "fn", "name": "tsfnAsyncCall", "js_doc": "", "def": "function tsfnAsyncCall(func: (...args: any[]) => any): Promise<void>"}
|
|
187
|
+
{"kind": "fn", "name": "acceptThreadsafeFunction", "js_doc": "", "def": "function acceptThreadsafeFunction(func: (err: Error | null, value: number) => any): void"}
|
|
188
|
+
{"kind": "fn", "name": "acceptThreadsafeFunctionFatal", "js_doc": "", "def": "function acceptThreadsafeFunctionFatal(func: (value: number) => any): void"}
|
|
189
|
+
{"kind": "fn", "name": "acceptThreadsafeFunctionTupleArgs", "js_doc": "", "def": "function acceptThreadsafeFunctionTupleArgs(func: (err: Error | null, arg0: number, arg1: boolean, arg2: string) => any): void"}
|
|
190
|
+
{"kind": "fn", "name": "getBuffer", "js_doc": "", "def": "function getBuffer(): Buffer"}
|
|
191
|
+
{"kind": "fn", "name": "appendBuffer", "js_doc": "", "def": "function appendBuffer(buf: Buffer): Buffer"}
|
|
192
|
+
{"kind": "fn", "name": "getEmptyBuffer", "js_doc": "", "def": "function getEmptyBuffer(): Buffer"}
|
|
193
|
+
{"kind": "fn", "name": "convertU32Array", "js_doc": "", "def": "function convertU32Array(input: Uint32Array): Array<number>"}
|
|
194
|
+
{"kind": "fn", "name": "createExternalTypedArray", "js_doc": "", "def": "function createExternalTypedArray(): Uint32Array"}
|
|
195
|
+
{"kind": "fn", "name": "mutateTypedArray", "js_doc": "", "def": "function mutateTypedArray(input: Float32Array): void"}
|
|
196
|
+
{"kind": "fn", "name": "derefUint8Array", "js_doc": "", "def": "function derefUint8Array(a: Uint8Array, b: Uint8ClampedArray): number"}
|
|
197
|
+
{"kind": "fn", "name": "bufferPassThrough", "js_doc": "", "def": "function bufferPassThrough(buf: Buffer): Promise<Buffer>"}
|
|
198
|
+
{"kind": "fn", "name": "arrayBufferPassThrough", "js_doc": "", "def": "function arrayBufferPassThrough(buf: Uint8Array): Promise<Uint8Array>"}
|
|
199
199
|
{"kind": "impl", "name": "AsyncBuffer", "js_doc": "", "def": ""}
|
|
200
|
-
{"kind": "fn", "name": "asyncReduceBuffer", "js_doc": "", "def": "
|
|
201
|
-
{"kind": "fn", "name": "runScript", "js_doc": "", "def": "
|
|
200
|
+
{"kind": "fn", "name": "asyncReduceBuffer", "js_doc": "", "def": "function asyncReduceBuffer(buf: Buffer): Promise<number>"}
|
|
201
|
+
{"kind": "fn", "name": "runScript", "js_doc": "", "def": "function runScript(script: string): unknown"}
|
|
Binary file
|
|
Binary file
|