John Fields
01/03/2025, 10:19 PMinterface IFoo {
bar(): void;
readonly __doNotUseOrImplementIt: {
readonly "IFoo": unique symbol;
};
}
An implementation without the property obviously doesn't compile. An implementation with the property doesn't compile either. For example this doesn't build:
class Foo implements IFoo {
bar(): void {
throw new Error("Method not implemented.");
}
readonly __doNotUseOrImplementIt: { readonly foo: unique symbol; };
}
Suggested workarounds in KT-56618 are:
• write a script to remove them (looks like a hack with unknown side effects)
• do expect/actual for any interfaces you want to implement in TS
Has anyone else run into this? Are these truly my best options? Am I just doing something wrong?turansky
01/04/2025, 8:58 PMIFoo
as external
to avoid regular interfaces limitationsEdoardo Luppi
01/05/2025, 3:48 PM