UNPKG

plugin-tls

Version:

plugin-tls 是插件系统相应的工具,可快速地让任何模块具备插件机制

30 lines 1.03 kB
/** * 合并属性 * 该方法会将 props 深度合并到 target 中, * - 所有 纯对象 的属性值都会被作为 props 进行深度合并 * - 对于不是纯对象的属性,会将其视为属性值设置到到目标中对应的属性上 * * @param target * @param props */ export declare function mergeProperties(target: any, props: any): any; /** * 按照 props 的结构,获取 target 的 属性对象 * - props 中所有 纯对象 都会被作为 props 进行递归地获取 * @param target * @param props * @returns */ export declare function getTargetProperties<Props>(target: any, props: Props): Props; /** * 创建属性设置器 * * @param target * @param props * @returns 会返回一个 set 和 unset 方法,set 方法用户将 props 中描述的属性值设置到 target 中, unset 方法用于恢复成原来的值 */ export declare function createPropertySetter(target: any, props: any): { set: () => void; unset: () => void; }; //# sourceMappingURL=properties.d.ts.map