Hello, I'm wondering if you would consider typing the added fields in TS, I just made an experiment here below as an example:
In this way, we can write the following code
const struct = new Struct()
.field("hello", "world")
.field("foo", "bar")
.build();
struct.hello // okay -> world
struct.foo // okay -> bar
struct.nope // error
This is just to show a possible way of adding properties by chaining to a type using ts.
Version TS>=5
Equivalent code for Version TS<5
Hello, I'm wondering if you would consider typing the added fields in TS, I just made an experiment here below as an example:
In this way, we can write the following code
This is just to show a possible way of adding properties by chaining to a type using ts.
Version TS>=5
Equivalent code for Version TS<5