UNPKG

plugin-tls

Version:

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

79 lines (37 loc) 1.05 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [plugin-tls](./plugin-tls.md) &gt; [mixin](./plugin-tls.mixin_4.md) ## mixin() function 混合 **Signature:** ```typescript export declare function mixin(target: any, ...sources: any[]): any; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> target </td><td> any </td><td> 目标对象,所有 源对象 的属性都要被混入进到 目标对象中 </td></tr> <tr><td> sources </td><td> any\[\] </td><td> 源对象,所有 源对象 的属性都要被混入进到 目标对象中 </td></tr> </tbody></table> **Returns:** any 混入后的 target ## Remarks 将 source 的所有成员混入 target 对象中。 与 `Object.assign()` 的功能类似,不同的是 `mixin()` 会在 target 对象中 保持 source 对象属性的 PropertyDescriptors