This repository was archived by the owner on May 19, 2025. It is now read-only.

Description
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>