apollographql / apollographql/apollo-tooling
apollo-env polyfill fromentries does not match Typescript ES2019
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 460
- PR merge metrics
- No merged PRs in 30d
Description
Hi!
Currently, `Object.fromentries` in the `apollo-env` polyfill is declared as:
```typescript
fromEntries(map: [K, V][]): Record;
```
While the Typescript official method is:
```typescript
fromEntries(entries: Iterable): { [k: string]: T };
```
Since `apollo-env` is declared globally, it will overwrite the official method. And the official typing is nicer to work with.
Would it be possible to align the typing with the official one and/or remove it since it is now part of >ES2019.
Thanks!
Contributor guide
Research direction
Search the repository for the apollo-env Object.fromEntries declaration shown in the issue and compare it with the TypeScript ES2019 signature quoted there. Verify the updated or removed declaration with the project's existing TypeScript checks; done means the global polyfill no longer overrides the official typing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100