syntax icon indicating copy to clipboard operation
syntax copied to clipboard

weird interaction between object type composition and row varaibles

Open bobzhang opened this issue 4 years ago • 0 comments

it is common that we define a closed object type, but use it as an extensible type:

type student = {"name": string}

let f = (param : {.. ...student}) => {..}
  • This is weird, we need five dots to express this
  • This is common pattern to express extensible row types.

bobzhang avatar May 24 '21 05:05 bobzhang