feat(codemode): add Set method parity (#38000)
This commit is contained in:
parent
455b5d3165
commit
f5a487ffcd
4 changed files with 615 additions and 7 deletions
|
|
@ -41,7 +41,23 @@ export const mapMethods = new Set(["get", "set", "has", "delete", "clear", "forE
|
|||
|
||||
export const mapStatics = new Set(["groupBy"])
|
||||
|
||||
export const setMethods = new Set(["add", "has", "delete", "clear", "forEach", "keys", "values", "entries"])
|
||||
export const setMethods = new Set([
|
||||
"add",
|
||||
"has",
|
||||
"delete",
|
||||
"clear",
|
||||
"forEach",
|
||||
"keys",
|
||||
"values",
|
||||
"entries",
|
||||
"union",
|
||||
"intersection",
|
||||
"difference",
|
||||
"symmetricDifference",
|
||||
"isSubsetOf",
|
||||
"isSupersetOf",
|
||||
"isDisjointFrom",
|
||||
])
|
||||
|
||||
export const spreadItems = (value: unknown): Array<unknown> | undefined => {
|
||||
if (Array.isArray(value)) return value
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue