forked from swiftwasm/JavaScriptKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNamespaces.Global.d.ts
More file actions
104 lines (101 loc) · 2.5 KB
/
Namespaces.Global.d.ts
File metadata and controls
104 lines (101 loc) · 2.5 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
// 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 {};
declare global {
namespace Collections {
class Container {
constructor();
addItem(item: Greeter): void;
getItems(): Greeter[];
release(): void;
}
}
namespace MyModule {
namespace Utils {
function namespacedFunction(): string;
}
}
namespace Utils {
namespace Converters {
class Converter {
constructor();
toString(value: number): string;
release(): void;
}
}
}
namespace __Swift {
namespace Foundation {
class Greeter {
constructor(name: string);
greet(): string;
release(): void;
}
class UUID {
uuidString(): string;
release(): void;
}
}
}
}
/// 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 Greeter extends SwiftHeapObject {
greet(): string;
}
export interface Converter extends SwiftHeapObject {
toString(value: number): string;
}
export interface UUID extends SwiftHeapObject {
uuidString(): string;
}
export interface Container extends SwiftHeapObject {
getItems(): Greeter[];
addItem(item: Greeter): void;
}
export type Exports = {
plainFunction(): string;
Collections: {
Container: {
new(): Container;
}
},
MyModule: {
Utils: {
namespacedFunction(): string;
},
},
Utils: {
Converters: {
Converter: {
new(): Converter;
}
},
},
__Swift: {
Foundation: {
Greeter: {
new(name: string): Greeter;
}
UUID: {
}
},
},
}
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;
}>;