Skip to content

Enable "exactOptionalPropertyTypes" flag #21

@Gudahtt

Description

@Gudahtt

The TypeScript flag exactOptionalPropertyTypes causes TypeScript to distinguish between object properties that don't exist and properties that are set to undefined. This improves type safety for operations that iterate over keys.

Currently the types in this package result in a compiler error when this flag is enabled. This prevents the use of this flag in projects using this package (e.g. @metamask/controllers).

This flag was added in TypeScript v4.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions