constructor() — astro Function Reference
Architecture documentation for the constructor() function in content-layer.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD fe0e6854_cb0f_81e5_ad60_6bca483e0f15["constructor()"] 4a6efe25_e6e4_25af_3955_aede0d8f5983["ContentLayer"] fe0e6854_cb0f_81e5_ad60_6bca483e0f15 -->|defined in| 4a6efe25_e6e4_25af_3955_aede0d8f5983 style fe0e6854_cb0f_81e5_ad60_6bca483e0f15 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/content/content-layer.ts lines 60–71
constructor({ settings, logger, store, watcher }: ContentLayerOptions) {
// The default max listeners is 10, which can be exceeded when using a lot of loaders
watcher?.setMaxListeners(50);
this.#logger = logger;
this.#store = store;
this.#settings = settings;
if (watcher) {
this.#watcher = createWatcherWrapper(watcher);
}
this.#queue = new PQueue({ concurrency: 1 });
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does constructor() do?
constructor() is a function in the astro codebase, defined in packages/astro/src/content/content-layer.ts.
Where is constructor() defined?
constructor() is defined in packages/astro/src/content/content-layer.ts at line 60.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free