igniteui-react-grids
Version:
Ignite UI React grid components.
15 lines (14 loc) • 562 B
TypeScript
/**
* Creates a proxy around template context data that adds back
* the `dataContext` prop returning the original data
*/
export declare function withDataContext(data: unknown): any;
interface DataContextProp<T> {
/**
* @deprecated template context props are now available as the root object and can be accessed directly.
* E.g. instead of `ctx.dataContext.<prop>` just `ctx.<prop>`
*/
dataContext: T;
}
export type WithDataContext<T> = T extends [infer F, ...infer R] ? [F & DataContextProp<F>, ...WithDataContext<R>] : [];
export {};