UNPKG

com-tools

Version:

com-tools 提供了一些通用的工具函数;

72 lines (34 loc) 853 B
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [com-tools](./com-tools.md) &gt; [omitMembers](./com-tools.omitmembers.md) ## omitMembers() function 剔除根级成员,删除根级成员 **Signature:** ```typescript export declare function omitMembers<Obj = any, Key extends keyof Obj = keyof Obj>(obj: Obj, keys: Key[]): Omit<Obj, Key>; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> obj </td><td> Obj </td><td> </td></tr> <tr><td> keys </td><td> Key\[\] </td><td> </td></tr> </tbody></table> **Returns:** Omit&lt;Obj, Key&gt; 返回原来的对象,但删除了指定的成员 ## Remarks 会改变原对象