UNPKG

plugin-tls

Version:

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

77 lines (36 loc) 1.39 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [plugin-tls](./plugin-tls.md) &gt; [targetExtendWithInit](./plugin-tls.targetextendwithinit.md) ## targetExtendWithInit() function 扩展目标 **Signature:** ```typescript export declare function targetExtendWithInit<C extends ClassType, E>(cla: C, ext: E & ThisType<InstanceType<C> & E> & PrivateMemberOfExtendWithInit<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 &amp; ThisType&lt;InstanceType&lt;C&gt; &amp; E&gt; &amp; [PrivateMemberOfExtendWithInit](./plugin-tls.privatememberofextendwithinit.md)<!-- -->&lt;C&gt; </td><td> 扩展描述对象,会自动更改其this的类型 </td></tr> </tbody></table> **Returns:** E &amp; ThisType&lt;InstanceType&lt;C&gt; &amp; E&gt; 返回注入了 this 类型的 ext 对象本身 ## Remarks 与 [defineExtendWithInit()](./plugin-tls.defineextendwithinit.md) 的区别是:`targetExtend` 会执行对 cla 的扩展操作,而 [defineExtendWithInit()](./plugin-tls.defineextendwithinit.md) 不会