rescript-labs / decco

Bucklescript PPX which generates JSON (de)serializers for user-defined types
MIT License
228 stars 27 forks source link

Add built in codec for refs? #79

Open em opened 2 years ago

em commented 2 years ago

Is this doable? Encode .contents and decode with initial .contents

I get

  We've found a bug for you!
  /Users/em/projects/prefetcher/src/Process.res

  The value ref_encode can't be found

with a record type like this

@decco
type status = {
  counter: ref<int>,
 }

P.S. @ryb73 please don't leave rescript! Come work with us at maker.co instead. : ) Decco has been a life safer!