feat(codemode): add groupBy parity (#37992)
This commit is contained in:
parent
17c1e9b083
commit
0c18d06c9f
7 changed files with 289 additions and 9 deletions
|
|
@ -39,6 +39,8 @@ export const arrayMethods = new Set([
|
|||
|
||||
export const mapMethods = new Set(["get", "set", "has", "delete", "clear", "forEach", "keys", "values", "entries"])
|
||||
|
||||
export const mapStatics = new Set(["groupBy"])
|
||||
|
||||
export const setMethods = new Set(["add", "has", "delete", "clear", "forEach", "keys", "values", "entries"])
|
||||
|
||||
export const spreadItems = (value: unknown): Array<unknown> | undefined => {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { boundedData, coerceToString } from "./value.js"
|
|||
|
||||
export const objectMethodsPreservingIdentity = new Set(["assign", "values", "entries", "fromEntries"])
|
||||
|
||||
export const objectStatics = new Set(["keys", "values", "entries", "hasOwn", "is", "assign", "fromEntries"])
|
||||
export const objectStatics = new Set(["keys", "values", "entries", "hasOwn", "is", "assign", "fromEntries", "groupBy"])
|
||||
|
||||
export const invokeObjectMethod = (name: string, args: Array<unknown>, node: AstNode): unknown => {
|
||||
const requireObject = (): Record<string, unknown> => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue