Type Alias: KeyPath ​
ts
type KeyPath = string | string[];
KeyPath
is a type that represents a key path in a key-value pair.
It can be a string or an array of strings.
Example ​
js
const keyPath: KeyPath = "user.name";
const keyPathArray: KeyPath = ["user", "name"]; // This type is used to access nested properties in an object.