If I desire a tagged function with an interface such as:
interface TaggedFun {
(args): void;
tag: boolean;
}
It appears that declaring a function to match this signature is not possible (since any function literal will lack the mandatory tag
property);
The only recourse is to make tag
optional and then remember to assign a value to it later.
Is there a method to uphold type safety (i.e. enforce the tag requirement in the type)?