Type alias ObjectOptional<Schema>
ObjectOptional<Schema>: { [ Key in keyof Schema as Schema[Key] extends ExactOptionalGuard ? Key : never]?: Schema[Key] extends ExactOptionalGuard & infer Original ? Original : never } & { [ Key in keyof Schema as Schema[Key] extends ExactOptionalGuard ? never : Key]: Schema[Key] }
Type Parameters
-
Schema extends Record<string, unknown>
A helper type to make properties with
undefinedin their type optional, but notundefineditself.Deprecated
Use
ObjectTypeand/orExactOptionalizefrom@metamask/superstruct@>=3.2.0instead.Example