Open adithyaselv opened 1 week ago
Introduce RecordOf syntax to get record type from a table type.
eg:
Account := Type(RecordOf(Accounts)); Points := Type([{x : Number, y : Number}]); Point := Type(RecordOf(Points)); distance(a: Point, b: Point): Number = Sqrt(Power(b.x-a.x, 2) + Power(b.y-a.y, 2));
RecordOf works only within a TypeLiteral . Lays foundations for future type helpers (eg: Union multiple record types ... ) that we may have.
RecordOf
Union
:=
Account := RecordOf(Accounts);
can mean type vs an UDF
✅ No public API change.
Introduce RecordOf syntax to get record type from a table type.
eg:
RecordOf
works only within a TypeLiteral . Lays foundations for future type helpers (eg:Union
multiple record types ... ) that we may have.RecordOf
keyword in functions:=
for example ,can mean type vs an UDF