Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Closed
Description
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I haveread the FAQ and my problem is not listed.
Repro
{"rules": {"@typescript-eslint/no-useless-constructor": [2] }}import{INTERNAL_SERVER_ERROR}from'./constants'importtype{ApiError,ApiErrorOptions}from'shared'exportclassResponseErrorextendsErrorimplementsApiError{declarecode:stringdeclarereason:stringdeclareextra:object|undefineddeclaredetails:unknown[]|undefinedconstructor(optionOrMsg:Partial<ApiErrorOptions>|string){constoptions=typeofoptionOrMsg==='string' ?{message:optionOrMsg} :optionOrMsgsuper(options.message)this.code=options.code||String(INTERNAL_SERVER_ERROR)this.reason=options.reason||'Internal Server Error'this.extra=options.extrathis.details=options.details}}exportclassRedirectErrorextendsResponseError{constructor(url:string){// error reported, unexpected, it changes the constructor typesuper(url)}}
Expected Result
No error
Actual Result
error
Additional Info
Versions
| package | version |
|---|---|
@typescript-eslint/eslint-plugin | 4.29.3 |
@typescript-eslint/parser | 4.29.3 |
TypeScript | 4.4.2 |
ESLint | 7.32.0 |
node | 12.22.5 |