Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing override keyword when creating fromData method on inherited class #1041

Open
alebo611 opened this issue Nov 21, 2023 · 1 comment
Open

Comments

@alebo611
Copy link

If a class A inherits class B,
the resulting typescript classes will both have each a fromData method.
However, A, must have the keyword is missing the "override" keyword in order to be syntactically correct typescript.

wrong:
static fromData(data: FooBar, target?: FooBar): FooBar {

correct:
static override fromData(data: FooBar, target?: FooBar): FooBar {

@leomayer
Copy link

I have the same problem. I get exported

export class EditChapterDto extends ChapterDto<EditChapterDto> {
  children: EditChapterDto[];

but I need to have

export class EditChapterDto extends ChapterDto<EditChapterDto> {
   override  children: EditChapterDto[];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants