Here is my full code.
type Foo = object
prop: uint8
let a = Foo(prop: 4)
a.prop = nil
let b = Foo(prop: nil)
b.prop = 5
I can't figure out how to make this value null. Most things I try will create wrapper objects like { prop: [null, 0] } or won't compile.
Here are some things I guessed would work but don't compile:
type Foo = object
prop: uint8?
type Foo = object
prop: uint8 | Nil
type Foo = object
prop: uint8 | nil