@teamkeel/wasm 0.34.0 → 0.36.0

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.
Files changed (3) hide show
  1. package/dist/index.d.ts +44 -16
  2. package/dist/index.js +7221 -530
  3. package/package.json +5 -4
package/dist/index.d.ts CHANGED
@@ -1,30 +1,58 @@
1
1
  declare module '@teamkeel/wasm/build' {
2
- export {};
3
- }
2
+ export {};
4
3
 
4
+ }
5
5
  declare module '@teamkeel/wasm/index' {
6
- interface ValidateOptions {
7
- color: boolean;
8
- }
9
-
10
- interface KeelAPI {
11
- format: (schemaString: string) => string;
12
- validate: (schemaString: string, options?: ValidateOptions) => string;
13
- }
14
- const instantiate: () => Promise<KeelAPI>;
15
- export default instantiate;
6
+ import { KeelAPI } from '@teamkeel/wasm/typings';
7
+ const keel: () => Promise<KeelAPI>;
8
+ export default keel;
16
9
 
17
10
  }
11
+ declare module '@teamkeel/wasm/lib/transformKeys' {
12
+ const _default: (obj: Record<string, any>) => Record<string, any>;
13
+ export default _default;
18
14
 
15
+ }
19
16
  declare module '@teamkeel/wasm/lib/wasm_exec' {
20
17
 
21
18
  }
22
-
23
19
  declare module '@teamkeel/wasm/lib/wasm_exec_node' {
24
- export {};
20
+ export {};
21
+
25
22
  }
23
+ declare module '@teamkeel/wasm/typings' {
24
+ export interface GoExec {
25
+ run: (instance: WebAssembly.Instance) => void;
26
+ importObject: any;
27
+ }
28
+ export interface KeelAPI {
29
+ format: (schemaString: string) => string;
30
+ validate: (schemaString: string, options?: ValidateOptions) => any;
31
+ }
32
+ export interface ValidateOptions {
33
+ color: boolean;
34
+ }
35
+ export interface Pos {
36
+ column: number;
37
+ filename: string;
38
+ line: number;
39
+ offset: number;
40
+ }
41
+ export interface ValidationError {
42
+ code: string;
43
+ pos: Pos;
44
+ endPos: Pos;
45
+ hint: string;
46
+ shortMessage: string;
47
+ message: string;
48
+ }
49
+ export interface ValidationResult {
50
+ errors: ValidationError[];
51
+ ast: any;
52
+ }
26
53
 
54
+ }
27
55
  declare module '@teamkeel/wasm' {
28
- import main = require('@teamkeel/wasm/index');
29
- export = main;
56
+ import main = require('@teamkeel/wasm/typings');
57
+ export = main;
30
58
  }