libchai 0.1.5 → 0.1.6
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/chai.d.ts +5 -0
- package/chai.js +39 -22
- package/chai_bg.wasm +0 -0
- package/package.json +1 -1
package/chai.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
|
+
* @param {any} js_config
|
|
5
|
+
*/
|
|
6
|
+
export function validate(js_config: any): void;
|
|
7
|
+
/**
|
|
4
8
|
* @param {any} js_input
|
|
5
9
|
* @returns {any}
|
|
6
10
|
*/
|
|
@@ -26,6 +30,7 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
26
30
|
export interface InitOutput {
|
|
27
31
|
readonly memory: WebAssembly.Memory;
|
|
28
32
|
readonly __wbg_webinterface_free: (a: number) => void;
|
|
33
|
+
readonly validate: (a: number, b: number) => void;
|
|
29
34
|
readonly encode: (a: number, b: number) => void;
|
|
30
35
|
readonly evaluate: (a: number, b: number) => void;
|
|
31
36
|
readonly optimize: (a: number, b: number, c: number) => void;
|
package/chai.js
CHANGED
|
@@ -197,6 +197,23 @@ function debugString(val) {
|
|
|
197
197
|
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
198
198
|
return className;
|
|
199
199
|
}
|
|
200
|
+
/**
|
|
201
|
+
* @param {any} js_config
|
|
202
|
+
*/
|
|
203
|
+
export function validate(js_config) {
|
|
204
|
+
try {
|
|
205
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
206
|
+
wasm.validate(retptr, addHeapObject(js_config));
|
|
207
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
208
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
209
|
+
if (r1) {
|
|
210
|
+
throw takeObject(r0);
|
|
211
|
+
}
|
|
212
|
+
} finally {
|
|
213
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
200
217
|
/**
|
|
201
218
|
* @param {any} js_input
|
|
202
219
|
* @returns {any}
|
|
@@ -372,28 +389,6 @@ function __wbg_get_imports() {
|
|
|
372
389
|
const ret = getObject(arg0) === undefined;
|
|
373
390
|
return ret;
|
|
374
391
|
};
|
|
375
|
-
imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
|
|
376
|
-
const ret = new Error();
|
|
377
|
-
return addHeapObject(ret);
|
|
378
|
-
};
|
|
379
|
-
imports.wbg.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {
|
|
380
|
-
const ret = getObject(arg1).stack;
|
|
381
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
382
|
-
const len1 = WASM_VECTOR_LEN;
|
|
383
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
384
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
385
|
-
};
|
|
386
|
-
imports.wbg.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
|
|
387
|
-
let deferred0_0;
|
|
388
|
-
let deferred0_1;
|
|
389
|
-
try {
|
|
390
|
-
deferred0_0 = arg0;
|
|
391
|
-
deferred0_1 = arg1;
|
|
392
|
-
console.error(getStringFromWasm0(arg0, arg1));
|
|
393
|
-
} finally {
|
|
394
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
395
|
-
}
|
|
396
|
-
};
|
|
397
392
|
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
398
393
|
const ret = getObject(arg0);
|
|
399
394
|
return addHeapObject(ret);
|
|
@@ -428,6 +423,28 @@ function __wbg_get_imports() {
|
|
|
428
423
|
imports.wbg.__wbg_set_9182712abebf82ef = function(arg0, arg1, arg2) {
|
|
429
424
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
430
425
|
};
|
|
426
|
+
imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
|
|
427
|
+
const ret = new Error();
|
|
428
|
+
return addHeapObject(ret);
|
|
429
|
+
};
|
|
430
|
+
imports.wbg.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {
|
|
431
|
+
const ret = getObject(arg1).stack;
|
|
432
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
433
|
+
const len1 = WASM_VECTOR_LEN;
|
|
434
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
435
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
436
|
+
};
|
|
437
|
+
imports.wbg.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
|
|
438
|
+
let deferred0_0;
|
|
439
|
+
let deferred0_1;
|
|
440
|
+
try {
|
|
441
|
+
deferred0_0 = arg0;
|
|
442
|
+
deferred0_1 = arg1;
|
|
443
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
444
|
+
} finally {
|
|
445
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
446
|
+
}
|
|
447
|
+
};
|
|
431
448
|
imports.wbg.__wbg_performance_eeefc685c9bc38b4 = function(arg0) {
|
|
432
449
|
const ret = getObject(arg0).performance;
|
|
433
450
|
return addHeapObject(ret);
|
package/chai_bg.wasm
CHANGED
|
Binary file
|