Skip to content

cupertino-files / FormulaOwnerRegistry

Class: FormulaOwnerRegistry ​

Defined in: src/tsce/owners.ts:254

Every formula owner in a document, resolved as far as the file allows.

Built once and reused: a document has hundreds of owners and resolving one means chasing its base, so a per-lookup scan would be quadratic.

Constructors ​

Constructor ​

new FormulaOwnerRegistry(store): FormulaOwnerRegistry

Defined in: src/tsce/owners.ts:257

Parameters ​

store ​

ObjectStore

Returns ​

FormulaOwnerRegistry

Accessors ​

size ​

Get Signature ​

get size(): number

Defined in: src/tsce/owners.ts:329

Returns ​

number

Methods ​

all() ​

all(): FormulaOwner[]

Defined in: src/tsce/owners.ts:373

Every owner, for diagnostics.

Returns ​

FormulaOwner[]


lookup() ​

lookup(uid): FormulaOwner | undefined

Defined in: src/tsce/owners.ts:334

Look an owner up by its identity.

Parameters ​

uid ​

OwnerUid | undefined

Returns ​

FormulaOwner | undefined


tableName() ​

tableName(uid): string | undefined

Defined in: src/tsce/owners.ts:345

The name of the table an owner belongs to.

The point of the whole map: an AST's cross-table table_id is one of these identities, so this is what turns an unnameable reference into Revenue::A2.

Parameters ​

uid ​

OwnerUid | undefined

Returns ​

string | undefined


tableUid() ​

tableUid(name): OwnerUid | undefined

Defined in: src/tsce/owners.ts:358

The other direction: the identity Revenue::A2 must store.

Every cross-table node in the corpus — 1020 of 1020 — carries the target table's kind-1 owner UUID, so that is the only kind consulted. Two tables sharing a name is refused rather than guessed: Numbers scopes names per sheet, and a reference that silently picked one would compute the wrong number somewhere far from the mistake.

Parameters ​

name ​

string

Returns ​

OwnerUid | undefined


unresolved() ​

unresolved(): FormulaOwner[]

Defined in: src/tsce/owners.ts:383

Owners that name no object.

Excludes the document-level sentinel, which names nothing by design — counting it as unresolved would report a gap in every file.

Returns ​

FormulaOwner[]


isDocumentOwner() ​

static isDocumentOwner(uid): boolean

Defined in: src/tsce/owners.ts:390

True for the fixed document-level identity rather than a real owner.

Parameters ​

uid ​

OwnerUid | undefined

Returns ​

boolean

MIT licensed. Independently made — not by Apple in California. Not affiliated with or endorsed by Apple Inc.