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
The TypeScript flag
exactOptionalPropertyTypescauses TypeScript to distinguish between object properties that don't exist and properties that are set toundefined. 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