UNPKG

plugin-tls

Version:

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

61 lines (29 loc) 1.26 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [plugin-tls](./plugin-tls.md) &gt; [createTargetExtendWithInit](./plugin-tls.createtargetextendwithinit.md) ## createTargetExtendWithInit() function 创建用于扩展目标的便捷函数 **Signature:** ```typescript export declare function createTargetExtendWithInit<C extends ClassType>(cla: C): <E>(ext: E & ThisType<InstanceType<C> & E> & PrivateMemberOfExtendWithInit<C>) => E & ThisType<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> </tbody></table> **Returns:** &lt;E&gt;(ext: E &amp; ThisType&lt;InstanceType&lt;C&gt; &amp; E&gt; &amp; [PrivateMemberOfExtendWithInit](./plugin-tls.privatememberofextendwithinit.md)<!-- -->&lt;C&gt;) =&gt; E &amp; ThisType&lt;C &amp; E&gt; 可以用于 扩展目标 的便利函数 ## Remarks 它返回的便利函数的功能与 [targetExtendWithInit()](./plugin-tls.targetextendwithinit.md) 的功能一样,唯一区别是不再需要接收 cla 参数了