File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 1616
1717-  Fix node.js ExperimentalWarning. https://github.com/rescript-lang/rescript/pull/7379 
1818-  Fix issue with gentype and stdlib json. https://github.com/rescript-lang/rescript/pull/7378 
19+ -  Fix type of RegExp.Result.matches. https://github.com/rescript-lang/rescript/pull/7393 
1920
2021#### :house :  Internal 
2122
Original file line number Diff line number Diff line change 33module  Result  =  {
44  type  t  =  array <option <string >>
55  @get_index  external  fullMatch : (t , @as (0 ) _ ) =>  string  =  "" 
6-   @send  external  matches : (t , @as (1 ) _ ) =>  array <string > =  "slice" 
6+   @send  external  matches : (t , @as (1 ) _ ) =>  array <option < string > > =  "slice" 
77  @get  external  index : t  =>  int  =  "index" 
88  @get  external  input : t  =>  string  =  "input" 
99}
Original file line number Diff line number Diff line change @@ -43,15 +43,15 @@ module Result: {
4343  // This below will log "ReScript" and "is" to the console. 
4444  switch regexp->RegExp.exec("ReScript is pretty cool, right?") { 
4545  | None => Console.log("Nope, no match...") 
46-   | Some(result) => switch result->RegExp.Result.matches { 
46+   | Some(result) => switch result->RegExp.Result.matches->Array.keepSome  { 
4747    | [firstWord, secondWord] => Console.log2(firstWord, secondWord) 
4848    | _ => Console.log("Didn't find exactly two words...") 
4949    } 
5050  } 
5151  ``` 
5252  */ 
5353  @send 
54-   external  matches : (t , @as (1 ) _ ) =>  array <string > =  "slice" 
54+   external  matches : (t , @as (1 ) _ ) =>  array <option < string > > =  "slice" 
5555  @get  external  index : t  =>  int  =  "index" 
5656
5757  /** 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments