andywer / andywer/typed-emitter
Not compatible with template literals
Aberta
- Linguagem predominante
- JavaScript
- Estrelas
- 285
- Forks
- 29
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
```ts
import TypedEmitter from 'typed-emitter';
interface TemplateLiteralEvents {
error: (error: Error) => void,
message: (body: string, from: string) => void
[key: `test:${string}`]: () => void;
}
type Test = TypedEmitter;
```
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.
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Avaliação
Esta issue ainda não foi avaliada.