UNPKG

@mui/internal-docs-infra

Version:

MUI Infra - internal documentation creation tools.

14 lines 671 B
/** * Collects identifier names that are already declared in the given source * (top-level imports, `const`/`let`/`var` bindings, function and class * declarations). * * The result is used to seed conflict-resolution when injecting additional * imports so that we never shadow an existing binding. * * This is intentionally a lightweight regex-based scan rather than a full * parser: we only need to gather identifier names well enough to avoid * collisions; over-collecting (e.g. matching a name inside a comment) is * harmless because it just causes the new import to be aliased. */ export declare function collectDeclaredNames(source: string): Set<string>;