andywer / andywer/typed-emitter
Generics example for 2.x does not compile
Open
- Dominant language
- JavaScript
- Stars
- 285
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
The example for generics in the documentation does not work:
```
class MyEventEmitter extends (EventEmitter as { new(): TypedEmitter }) {
// ...
}
```
Just gives `error TS2344: Type 'T' does not satisfy the constraint 'EventMap'.` on the `TypedEmitter` part...
TypeScript 4.5.5
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.