File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -120,17 +120,15 @@ class SwiftRuntimeHeap {
120
120
export class SwiftRuntime {
121
121
private instance : WebAssembly . Instance | null ;
122
122
private heap : SwiftRuntimeHeap ;
123
- private functionRegistry : FinalizationRegistry ;
123
+ private functionRegistry : FinalizationRegistry < unknown > ;
124
124
private version : number = 701 ;
125
125
126
126
constructor ( ) {
127
127
this . instance = null ;
128
128
this . heap = new SwiftRuntimeHeap ( ) ;
129
- if ( typeof FinalizationRegistry !== "undefined" ) {
130
- this . functionRegistry = new FinalizationRegistry (
131
- this . handleFree . bind ( this )
132
- ) ;
133
- }
129
+ this . functionRegistry = new FinalizationRegistry (
130
+ this . handleFree . bind ( this )
131
+ ) ;
134
132
}
135
133
136
134
handleFree ( id : unknown ) {
You can’t perform that action at this time.
0 commit comments