swagger-api / swagger-api/swagger-codegen-generators
[typescript-angular] Missing 'override's in encoder.ts
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 299
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
Description
Since typescript 4.3.0, there is support for adding the keyword override to methods overriding the super method. The usage of this keyword can be enforced by activating noImplicitOverride in the tsconfig.json. If you generate a new Angular project, this flag is set to true`, therefore the compilation fails with the following error message:
encoder.ts:13:5 - error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'HttpUrlEncodingCodec'.
It would be nice if you could add this keyword to the template. This will break clients using Typescript < 4.3.0.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the TypeScript Angular template's encoder.ts and start at line 13, where the member overrides HttpUrlEncodingCodec. Add the required override modifiers to the template, then verify that the generated client compiles with noImplicitOverride enabled; account for the stated TypeScript 4.3 compatibility impact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100