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 {
120120export class SwiftRuntime {
121121 private instance : WebAssembly . Instance | null ;
122122 private heap : SwiftRuntimeHeap ;
123- private functionRegistry : FinalizationRegistry ;
123+ private functionRegistry : FinalizationRegistry < unknown > ;
124124 private version : number = 701 ;
125125
126126 constructor ( ) {
127127 this . instance = null ;
128128 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+ ) ;
134132 }
135133
136134 handleFree ( id : unknown ) {
You can’t perform that action at this time.
0 commit comments