As long as I mainly use optional types, to be able to update individual properties, instead of passing whole object, I want to create an optional type, so instead of writing:
type User {
id: String | Null;
active: Boolean | Null;
....
}
I can do smth like:
type User {
id: Str;
active: Bool;
}
type Str extends Null {
validate() { this.isString() }
}
When doing so, following is generated:
"id": {
".validate": "false"
},
In addition, would be nice to have ability to implement something like O<T>, i.e. O<String>, O<Boolean>
As long as I mainly use optional types, to be able to update individual properties, instead of passing whole object, I want to create an optional type, so instead of writing:
I can do smth like:
When doing so, following is generated:
In addition, would be nice to have ability to implement something like
O<T>
, i.e.O<String>
,O<Boolean>