Skip to content

Conversation

bjaspan
Copy link
Contributor

@bjaspan bjaspan commented Nov 5, 2024

…s field without explicitly reinitializing the field

According to an internal Google audit of TS code: When public class fields are enabled and target output is set to ES2022, TypeScript reports the following error -

class A {
    x: SomeType = new SomeType();
}

class B extends A {

    override x!: NarrowType;      // Property 'x' will overwrite the base property in 'A'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration.

}

…s field without explicitly reinitializing the field
@bjaspan bjaspan requested a review from a team as a code owner November 5, 2024 18:57
Copy link
Member

@pokey pokey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me. Any idea how we could catch this one in CI?

@pokey pokey added this pull request to the merge queue Nov 6, 2024
Merged via the queue into cursorless-dev:main with commit 4362f67 Nov 6, 2024
15 checks passed
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

Successfully merging this pull request may close these issues.

2 participants