# configuration/strings/closure.strings.ts

> 13 lines of code and 4 definitions.

Tree: Project Scripts
Language: typescript
Layer: product
Canonical: https://banes-lab.com/anatomy/scripts#file-scripts-configuration-strings-closure-strings-ts
Source text: https://banes-lab.com/source/scripts/configuration/strings/closure.strings.ts.txt

Listed in [configuration/strings](https://banes-lab.com/api/source/scripts/configuration/strings.md), before [configuration/strings/coverage.strings.ts](https://banes-lab.com/source/scripts/configuration/strings/coverage.strings.ts.md).

## Definitions

- `unmatchedBarrels` (lexical_declaration, line 1, exported)
- `unmatchedPattern` (lexical_declaration, line 8, exported)
- `graphLine` (lexical_declaration, line 12, exported)
- `parts` (lexical_declaration, line 13, exported)

## Contained in

- [configuration/strings](https://banes-lab.com/anatomy/scripts/folder-scripts-configuration-strings.md)

## Used by

- [core/analyzers/barrel.analyzer.ts](https://banes-lab.com/source/scripts/core/analyzers/barrel.analyzer.ts.md)

## Linked from

- [core/analyzers](https://banes-lab.com/anatomy/scripts/folder-scripts-core-analyzers.md)

## Source

```typescript
export const unmatchedBarrels = function unmatchedBarrels(lines: readonly string[]): string {
    return [
        `closure-graph: ${String(lines.length)} import.meta.glob pattern(s) match no files. A barrel that collects nothing registers nothing, and every consumer of it gets an empty registry:`,
        ...lines.map((line) => `  ${line}`),
    ].join("\n");
};

export const unmatchedPattern = function unmatchedPattern(barrel: string, pattern: string): string {
    return `${barrel}  →  ${pattern}`;
};

export const graphLine = function graphLine(counts: Readonly<Record<string, number>>): string {
    const parts = Object.entries(counts).map(([label, count]) => `${String(count)} ${label}`);
    return `closure-graph: ${parts.join(", ")}\n`;
};
```
