dethcrypto / dethcrypto/TypeChain
Type union in getEvent instead of overload
Open
enhancement
ethers-v5
- Dominant language
- TypeScript
- Stars
- 2.8k
- Forks
- 376
- PR merge metrics
- No merged PRs in 30d
Description
If there was a single `getEvent(a: "Name1"|...|"EventN") : EventFragment` (instead of an [overload](https://github.com/dethcrypto/TypeChain/blob/0c2b42c756777e69074c2e6283bcff9be8aa9c5f/packages/target-ethers-v5/src/codegen/index.ts#L374)), Typescript would accept things like
```typescript
declare const evt : "Name1" | "Name2";
getEvent(evt);
```
Contributor guide
Assessment
This issue has not been assessed yet.