UNPKG

@nutui/nutui-react

Version:

京东风格的轻量级移动端 React 组件库,支持一套代码生成 H5 和小程序

10 lines (9 loc) 529 B
export declare function mergeProps<A, B>(a: A, b: B): B & A; export declare function mergeProps<A, B, C>(a: A, b: B, c: C): C & B & A; export declare function mergeProps<A, B, C, D>(a: A, b: B, c: C, d: D): D & C & B & A; /** * Merge props and return the first non-undefined value. * The later has higher priority. e.g. (10, 1, 5) => 5 wins. * This is useful with legacy props that have been deprecated. */ export declare function mergeProp<T, DefaultT extends T = T>(defaultProp: DefaultT, ...propList: T[]): T | undefined;