import TypedEmitter from 'typed-emitter';
interface TemplateLiteralEvents {
error: (error: Error) => void,
message: (body: string, from: string) => void
[key: `test:${string}`]: () => void;
}
type Test = TypedEmitter<TemplateLiteralEvents>;
fails with
Type 'TemplateLiteralEvents' does not satisfy the constraint 'EventMap'.
Index signature for type 'string' is missing in type 'TemplateLiteralEvents'.ts(2344)
I'm using typescript@4.9.5. Not sure how to support this, maybe this is a limitation of typescript.
fails with
I'm using typescript@4.9.5. Not sure how to support this, maybe this is a limitation of typescript.