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