/** * Where each custom element class was defined, read off the stack of its * `customElements.define` call. * * The plugin's transform stamps a class with its source file, but a page the * plugin never built has no stamp. What it may have is a sourcemap, and the * define call's stack gives the generated positions to map through it. This * module only records those positions; resolving them takes fetching the * page's scripts, which is the host's job (the extension's panel does it). * * Only defines made after {@link installDefineSites} runs are seen, so it has * to run before the page's own scripts: the extension injects it at * `document_start`. */ import type { GeneratedFrame } from '../../types/inspector.js'; /** * The http(s) frames of an `Error.stack`, innermost first, at most `max`. * Lines it cannot read are skipped, so the message line and foreign frames * fall out. */ export declare const parseStackFrames: (stack: string, max?: number) => GeneratedFrame[]; /** Records `frames` as where `ctor` was defined. */ export declare const rememberDefineFrames: (ctor: object, frames: GeneratedFrame[]) => void; /** Where `ctor` was defined, when a define call was seen for it. */ export declare const defineFramesOf: (ctor: object) => GeneratedFrame[] | undefined; /** The id events and tree nodes use for `ctor`'s define call, when one was seen. */ export declare const defineIdOf: (ctor: object) => number | undefined; /** The frames behind a {@link defineIdOf} id; `undefined` for one never issued. */ export declare const defineFramesById: (id: number) => GeneratedFrame[] | undefined; /** * Wraps `customElements.define` to record each call's stack. Idempotent, and * chains with whatever wraps `define` before or after it: it calls the * function it found and returns its result. */ export declare const installDefineSites: () => void; //# sourceMappingURL=define-sites.d.ts.map