We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ae62488 commit 43a33eeCopy full SHA for 43a33ee
Runtime/src/index.ts
@@ -120,17 +120,15 @@ class SwiftRuntimeHeap {
120
export class SwiftRuntime {
121
private instance: WebAssembly.Instance | null;
122
private heap: SwiftRuntimeHeap;
123
- private functionRegistry: FinalizationRegistry;
+ private functionRegistry: FinalizationRegistry<unknown>;
124
private version: number = 701;
125
126
constructor() {
127
this.instance = null;
128
this.heap = new SwiftRuntimeHeap();
129
- if (typeof FinalizationRegistry !== "undefined") {
130
- this.functionRegistry = new FinalizationRegistry(
131
- this.handleFree.bind(this)
132
- );
133
- }
+ this.functionRegistry = new FinalizationRegistry(
+ this.handleFree.bind(this)
+ );
134
}
135
136
handleFree(id: unknown) {
0 commit comments