Skip to content

Checker accepts definite assignment assertions on static fields #3635

Closed

Description

@nickna
class C { static value!: number; }

SharpTS at 72455db66 accepts this with --no-tsconfig --strict --noEmit. TypeScript 6.0.3 reports TS1255 with --ignoreConfig --strict --target ES2022 --noEmit because a definite assignment assertion is disallowed on a static field.

Found while verifying the static-field read diagnostic in #3621.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions