assemblyscript
assemblyscript copied to clipboard
support for type guards parsing
Hey there,
Type guards is now an old feature in typescript and an assemblyscript would be really beneficial:
const trait = Symbol();
interface MyTrait
{
[trait]:string
}
export function isBuffer(x: any): x is MyTrait
{
return trait in x;
}
The above piece of code is fully typescript compliant, but assembly script fails at parsing the typeguard, while the return type is clearly a boolean,