MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / getElement

Method getElement

packages/sdk/src/session.ts:310–319  ·  view source on GitHub ↗
(id: HfId)

Source from the content-addressed store, hash-verified

308 }
309
310 getElement(id: HfId): ElementSnapshot | null {
311 // Accept both bare ids (top-level) and scoped ids (sub-composition elements).
312 // Match by scopedId first (canonical); bare-id fallback keeps top-level compat
313 // for callers that don't yet use scoped ids.
314 return (
315 this.getElements().find((el) => el.scopedId === id) ??
316 this.getElements().find((el) => el.id === id && el.scopedId === el.id) ??
317 null
318 );
319 }
320
321 find(query: FindQuery): string[] {
322 return (

Callers

nothing calls this directly

Calls 2

getElementsMethod · 0.95
findMethod · 0.65

Tested by

no test coverage detected