apollographql / apollographql/apollo-tooling
@oclif conflict with the last version of typescript (>4.5.2)
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 460
- PR merge metrics
- No merged PRs in 30d
Description
**Intended outcome:**
I updated typescript version from 4.4..4 to 4.5.2 in yarn.lock
```
typescript@^4.1.3:
version "4.5.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.2.tgz#8ac1fba9f52256fdb06fb89e4122fa6a346c2998"
integrity sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==
```
I would expect that compiles correctly without errors.
**Actual outcome:**
When typescript is upgraded to 4.5.2,the @oclif dependency of apollo stopped working by compilation problems when a build is done.
```
node_modules/@oclif/command/lib/command.d.ts:69:70 - error TS2344: Type 'A' does not satisfy the constraint 'any[]'.
Type '{ [name: string]: any; }' is missing the following properties from type 'any[]': length, pop, push, concat, and 28 more.
69 }>(options?: Parser.Input, argv?: string[]): Parser.Output;
~
node_modules/@oclif/parser/lib/index.d.ts:16:60 - error TS2344: Type 'TArgs' does not satisfy the constraint 'any[]'.
Type '{ [name: string]: string; }' is missing the following properties from type 'any[]': length, pop, push, concat, and 28 more.
16 }>(argv: string[], options: Input): Output;
```
**How to reproduce the issue:**
Check the yarn.lock to assure that typescript is using the 4.5.2 or higher version and build the project.
**Versions**
apollo: "2.32.0"
apollo: "2.33.9"

Contributor guide
Research direction
Start with yarn.lock and reproduce the build using TypeScript 4.5.2 or newer. Inspect the reported declaration entry points in node_modules/@oclif/command/lib/command.d.ts and node_modules/@oclif/parser/lib/index.d.ts, then verify the project compiles without the shown TS2344 errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100