@workday/canvas-kit-react
Version:
The parent module that contains all Workday Canvas Kit React components
15 lines • 829 B
TypeScript
/**
* For custom themes that do not overwrite every default.
*/
export type RecursivePartial<T> = {
[P in keyof T]?: RecursivePartial<T[P]>;
};
/**
* The functions gets a new object proxy. This is used for theme to ensure regardless of a partial theme object
* there will be a fallback theme object so that properties aren't undefined regardless of the `target` object.
* This function will also handle nested properties.
* @param target A partial object with up to the same shape as the `fallback` object
* @param fallback A fallback object. If a property to be accessed from the proxy is not available on the target object, the fallback object will be used
*/
export declare function getObjectProxy<T extends {}>(target: RecursivePartial<T> | undefined, fallback: T): T;
//# sourceMappingURL=getObjectProxy.d.ts.map