File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -352,3 +352,18 @@ export class FutureInput extends Future<any> {
352352    this . schema  =  schema  ??  { } ; 
353353  } 
354354} 
355+ 
356+ /** 
357+  * Specify an `input` future that can be assigned a name when create a new module. 
358+  * Input types and validation paramters may optionally be described using a JSON Schema object. 
359+  * 
360+  * Default values may also be specified here and will be used if user input is not provided for this input. 
361+  */ 
362+ export  function  input ( schema ?: FutureInput [ "schema" ] )  { 
363+   // NOTE: using `any` as the return type here for now to ease using 
364+   // this in general node input args or helper functions. 
365+   // 
366+   // Once we ship our Future type reorganization work, we can just 
367+   // use this as-is (Future<any>) 
368+   return  new  FutureInput ( schema )  as  any ; 
369+ } 
Original file line number Diff line number Diff line change 1- import  {  FutureAnyObject ,  FutureInput ,   FutureString  }  from  "substrate/Future" ; 
1+ import  {  FutureAnyObject ,  FutureString ,   input  }  from  "substrate/Future" ; 
22import  {  StreamingResponse  }  from  "substrate/SubstrateStreamingResponse" ; 
33
44export  const  sb  =  { 
55  concat : FutureString . concat , 
66  jq : FutureAnyObject . jq , 
77  interpolate : FutureString . interpolate , 
8-   input :  ( schema ?:  FutureInput [ "schema" ] )   =>   new   FutureInput ( schema )   as   any , 
8+   input, 
99  streaming : { 
1010    fromSSEResponse : StreamingResponse . fromReponse , 
1111  } , 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments