Skip to content

Non-Nullable by default flag #641

@eborden

Description

@eborden

Closure compiler should have a flag to enable non-nullable by default. Switching to non-nullable as a compiler default would break a ton of backwards compatibility, but the existing semantics are screwy and a flag would allow a correction.

As it stands these two statements are equivalent:

/** @type {function(number)} */
/** @type {function(?number)} */

The current system requires a ridiculous amount of ! symbols to counteract this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Typesenhancementinternal-issue-createdAn internal Google issue has been created to track this GitHub issuetriage-doneHas been reviewed by someone on triage rotation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions