forked from swiftwasm/JavaScriptKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEnumAssociatedValue.Export.d.ts
More file actions
112 lines (98 loc) · 4.6 KB
/
EnumAssociatedValue.Export.d.ts
File metadata and controls
112 lines (98 loc) · 4.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
// NOTICE: This is auto-generated code by BridgeJS from JavaScriptKit,
// DO NOT EDIT.
//
// To update this file, just rebuild your project or run
// `swift package bridge-js`.
export const APIResultValues: {
readonly Tag: {
readonly Success: 0;
readonly Failure: 1;
readonly Flag: 2;
readonly Rate: 3;
readonly Precise: 4;
readonly Info: 5;
};
};
export type APIResultTag =
{ tag: typeof APIResultValues.Tag.Success; param0: string } | { tag: typeof APIResultValues.Tag.Failure; param0: number } | { tag: typeof APIResultValues.Tag.Flag; param0: boolean } | { tag: typeof APIResultValues.Tag.Rate; param0: number } | { tag: typeof APIResultValues.Tag.Precise; param0: number } | { tag: typeof APIResultValues.Tag.Info }
export const ComplexResultValues: {
readonly Tag: {
readonly Success: 0;
readonly Error: 1;
readonly Status: 2;
readonly Coordinates: 3;
readonly Comprehensive: 4;
readonly Info: 5;
};
};
export type ComplexResultTag =
{ tag: typeof ComplexResultValues.Tag.Success; param0: string } | { tag: typeof ComplexResultValues.Tag.Error; param0: string; param1: number } | { tag: typeof ComplexResultValues.Tag.Status; param0: boolean; param1: number; param2: string } | { tag: typeof ComplexResultValues.Tag.Coordinates; param0: number; param1: number; param2: number } | { tag: typeof ComplexResultValues.Tag.Comprehensive; param0: boolean; param1: boolean; param2: number; param3: number; param4: number; param5: number; param6: string; param7: string; param8: string } | { tag: typeof ComplexResultValues.Tag.Info }
export const APIOptionalResultValues: {
readonly Tag: {
readonly Success: 0;
readonly Failure: 1;
readonly Status: 2;
};
};
export type APIOptionalResultTag =
{ tag: typeof APIOptionalResultValues.Tag.Success; param0: string | null } | { tag: typeof APIOptionalResultValues.Tag.Failure; param0: number | null; param1: boolean | null } | { tag: typeof APIOptionalResultValues.Tag.Status; param0: boolean | null; param1: number | null; param2: string | null }
export type APIResultObject = typeof APIResultValues;
export type ComplexResultObject = typeof ComplexResultValues;
export type ResultObject = typeof ResultValues;
export type NetworkingResultObject = typeof NetworkingResultValues;
export type APIOptionalResultObject = typeof APIOptionalResultValues;
export {};
declare global {
namespace API {
const NetworkingResultValues: {
readonly Tag: {
readonly Success: 0;
readonly Failure: 1;
};
};
type NetworkingResultTag =
{ tag: typeof NetworkingResultValues.Tag.Success; param0: string } | { tag: typeof NetworkingResultValues.Tag.Failure; param0: string; param1: number }
}
namespace Utilities {
const ResultValues: {
readonly Tag: {
readonly Success: 0;
readonly Failure: 1;
readonly Status: 2;
};
};
type ResultTag =
{ tag: typeof ResultValues.Tag.Success; param0: string } | { tag: typeof ResultValues.Tag.Failure; param0: string; param1: number } | { tag: typeof ResultValues.Tag.Status; param0: boolean; param1: number; param2: string }
}
}
export type Exports = {
handle(result: APIResultTag): void;
getResult(): APIResultTag;
roundtripAPIResult(result: APIResultTag): APIResultTag;
roundTripOptionalAPIResult(result: APIResultTag | null): APIResultTag | null;
handleComplex(result: ComplexResultTag): void;
getComplexResult(): ComplexResultTag;
roundtripComplexResult(result: ComplexResultTag): ComplexResultTag;
roundTripOptionalComplexResult(result: ComplexResultTag | null): ComplexResultTag | null;
roundTripOptionalUtilitiesResult(result: Utilities.ResultTag | null): Utilities.ResultTag | null;
roundTripOptionalNetworkingResult(result: NetworkingResultTag | null): NetworkingResultTag | null;
roundTripOptionalAPIOptionalResult(result: APIOptionalResultTag | null): APIOptionalResultTag | null;
APIResult: APIResultObject
ComplexResult: ComplexResultObject
APIOptionalResult: APIOptionalResultObject
API: {
NetworkingResult: NetworkingResultObject
},
Utilities: {
Result: ResultObject
},
}
export type Imports = {
}
export function createInstantiator(options: {
imports: Imports;
}, swift: any): Promise<{
addImports: (importObject: WebAssembly.Imports) => void;
setInstance: (instance: WebAssembly.Instance) => void;
createExports: (instance: WebAssembly.Instance) => Exports;
}>;