forked from swiftwasm/JavaScriptKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEnumNamespace.Export.d.ts
More file actions
120 lines (113 loc) · 3.41 KB
/
EnumNamespace.Export.d.ts
File metadata and controls
120 lines (113 loc) · 3.41 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
113
114
115
116
117
118
119
120
// 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 type MethodObject = typeof MethodValues;
export type LogLevelObject = typeof LogLevelValues;
export type PortObject = typeof PortValues;
export type SupportedMethodObject = typeof SupportedMethodValues;
export {};
declare global {
namespace Configuration {
const LogLevelValues: {
readonly Debug: "debug";
readonly Info: "info";
readonly Warning: "warning";
readonly Error: "error";
};
type LogLevelTag = typeof LogLevelValues[keyof typeof LogLevelValues];
const PortValues: {
readonly Http: 80;
readonly Https: 443;
readonly Development: 3000;
};
type PortTag = typeof PortValues[keyof typeof PortValues];
}
namespace Networking {
namespace API {
class HTTPServer {
constructor();
call(method: Networking.API.MethodTag): void;
}
const MethodValues: {
readonly Get: 0;
readonly Post: 1;
readonly Put: 2;
readonly Delete: 3;
};
type MethodTag = typeof MethodValues[keyof typeof MethodValues];
}
namespace APIV2 {
namespace Internal {
class TestServer {
constructor();
call(method: Internal.SupportedMethodTag): void;
}
const SupportedMethodValues: {
readonly Get: 0;
readonly Post: 1;
};
type SupportedMethodTag = typeof SupportedMethodValues[keyof typeof SupportedMethodValues];
}
}
}
namespace Utils {
class Converter {
constructor();
toString(value: number): string;
}
}
}
/// Represents a Swift heap object like a class instance or an actor instance.
export interface SwiftHeapObject {
/// Release the heap object.
///
/// Note: Calling this method will release the heap object and it will no longer be accessible.
release(): void;
}
export interface Converter extends SwiftHeapObject {
toString(value: number): string;
}
export interface HTTPServer extends SwiftHeapObject {
call(method: Networking.API.MethodTag): void;
}
export interface TestServer extends SwiftHeapObject {
call(method: Internal.SupportedMethodTag): void;
}
export type Exports = {
Configuration: {
LogLevel: LogLevelObject
Port: PortObject
},
Networking: {
API: {
HTTPServer: {
new(): HTTPServer;
}
Method: MethodObject
},
APIV2: {
Internal: {
TestServer: {
new(): TestServer;
}
SupportedMethod: SupportedMethodObject
},
},
},
Utils: {
Converter: {
new(): Converter;
}
},
}
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;
}>;