File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change 11// Copyright 2017 Google Inc. Use of this source code is governed by an 
22// MIT-style license that can be found in the LICENSE file or at 
33// https://opensource.org/licenses/MIT. 
4- @JS ()
4+ @JS ("worker_threads" )
55library  worker_threads;
66
77import  'package:js/js.dart' ;
88import  'package:js/js_util.dart' ;
99
10- @JS ()
11- external  Object  _requireWorkerThreads (String  path);
10+ typedef  _WorkerThreads  =  void  Function () Function (
11+     String  Function (String ), String  Function (String ));
12+ 
13+ @JS ('require' )
14+ external  Object  _requireWorkerThreads (String  name);
1215
13- final  workers  =  _requireWorkerThreads ("worker_threads" );
16+ final  _worker  =  _requireWorkerThreads ("worker_threads" );
1417
1518@JS ()
1619external  Object  get  workerData;
@@ -46,7 +49,9 @@ class PortOptions {
4649@JS ()
4750external  ParentPort  get  parentPort;
4851
49- @JS ()
50- class  ParentPort  {
51-   external  static  void  postMessage (Object  message, PortOptions  options);
52+ @JS ("parentPort" )
53+ @anonymous 
54+ abstract  class  ParentPort  {
55+   external  factory  ParentPort ({Function  postMessage});
56+   external  void  postMessage (Object  message, PortOptions  options);
5257}
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments