plugin-tls
Version:
plugin-tls 是插件系统相应的工具,可快速地让任何模块具备插件机制
77 lines (36 loc) • 1.05 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [mixinTarget](./plugin-tls.mixintarget.md)
## mixinTarget() function
混合目标
**Signature:**
```typescript
export declare function mixinTarget<T, M>(target: T, m: M & ThisType<T & M>): M & ThisType<T & M> & T;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
target
</td><td>
T
</td><td>
混合的目标,用作 this 的类型
</td></tr>
<tr><td>
m
</td><td>
M & ThisType<T & M>
</td><td>
混合对象,会自动更改其this的类型
</td></tr>
</tbody></table>
**Returns:**
M & ThisType<T & M> & T
返回混合后的 target 对象
## Remarks
会执行对 CEarth 类的扩展操作。 与 [targetMixin()](./plugin-tls.targetmixin.md) 的区别仅仅是返回类型不一样。