Check if a given key exists in a type definition, supporting nested keys using dot notation (e.g., "person.name.first").
TODO: Support arrays in the path (e.g., "person.children.name").
Parameters
type: any
the type definition to check.
Optionalkey: string
the key to check for, which can be a simple key or a nested key using dot notation.
Returns boolean
true if the key exists in the type definition, false otherwise.
Check if a given key exists in a type definition, supporting nested keys using dot notation (e.g., "person.name.first"). TODO: Support arrays in the path (e.g., "person.children.name").