feat(javascript): retain queryable static route inventories (#6019)

This commit is contained in:
gensokyo-dev authored and GitHub committed 2026-10-22 16:54:14 +08:00
1 parent 933af60eba
commit 7d0efef62d
67 files changed
+74345 -231

No files matched your search

@@ -690,6 +690,19 @@ class ObjectReferenceWalk {
property: t.ObjectMethod | t.ObjectProperty,
name: string | null,
): void {
// An earlier unknown computed key cannot replace a later definite slot.
// Spreads obey the same overwrite proof; paired named accessors below
// retain their separate getter/setter semantics.
if (
name === null &&
this.#key != null &&
typeof this.#key !== "object" &&
(t.isObjectMethod(property, { kind: "get" })
? this.#data.has(String(this.#key)) ||
this.#getters.has(String(this.#key))
: this.#overwritten.has(String(this.#key)))
)
return;
if (
name !== null &&
!semanticPropertyPathKeyMatches(this.#key ?? null, name)