import {Module} from '@fuzdev/fuz_ui/module.svelte.js'; Rich runtime representation of a module with computed properties.
Wraps svelte-docinfo's ModuleJson with reactive derivations,
URL generation, and Declaration instances.
see also
{@linkhttps://github.com/ryanatkn/svelte-docinfo svelte-docinfo} for the analysis library``declaration.svelte.ts`` for the Declaration wrapper class
library
type Library
module_json
type ModuleJsonInput
path
Canonical module path — src/lib/-relative, with source extension
(.ts, .svelte, etc.). Examples: 'Alert.ts', 'helpers/foo.ts',
'actions/composables.ts'.
This is the key Library.module_by_path indexes, so it's also the
exact string TSDoc backtick references must use to auto-link to a
module via DocsLink.svelte (e.g., `` actions/composables.ts ``).
A leading ./ or a .js runtime extension will not match. Top-level
files match by bare filename; nested files require the full sub-path.
type string
path_import
Import-style path with ./ prefix.
type string
module_comment
type string | undefined
declarations
Array of Declaration instances. Filters out default exports.
type Declaration[]
url_api
API documentation URL for this module.
type string
url_api_full
Public documentation link (if homepage_url is available).
Absolute URL into the library's own deployed docs, for rendering a foreign library's modules on a different site (e.g. an aggregator).
type string | undefined
url_github
GitHub source URL.
type string | undefined
has_declarations
Whether the module has renderable declarations (after the default-export
filter in declarations).
type boolean
has_module_comment
type boolean
dependencies
Modules this imports (paths relative to src/lib).
type string[]
dependents
Modules that import this (paths relative to src/lib).
type string[]
has_dependencies
type boolean
has_dependents
type boolean
re_exports
Same-name re-export edges in this module's source (ModuleJson.reExports)
— the forward view of declarations' alsoExportedFrom, sorted by name
then module. Renamed re-exports appear as declarations with aliasOf
instead, and star exports in star_exports.
type { name: string; module: string; typeOnly?: boolean | undefined; sourceLine?: number | undefined; }[]
has_re_exports
type boolean
star_exports
Modules fully re-exported via export * from './module'
(ModuleJson.starExports), in source order. Star-projected symbols are
not materialized as declarations or re_exports edges — this is their
sole encoding.
type string[]
has_star_exports
type boolean
re_exports_by_module
Re-export edges grouped by canonical module path, groups sorted by path. Entries within each group keep their name-sorted serialized order.
type Map<string, Array<ReExportJsonInput>>
external_re_exports
Re-exports whose immediate target is an external package
(ModuleJson.externalReExports) — export {x} from 'pkg' and
export * as ns from 'pkg' forms, sorted by name then specifier.
type { name: string; specifier: string; originalName?: string | undefined; typeOnly?: boolean | undefined; sourceLine?: number | undefined; }[]
has_external_re_exports
type boolean
external_re_exports_by_specifier
External re-exports grouped by package specifier, groups sorted by specifier. Entries within each group keep their name-sorted serialized order.
type Map<string, Array<ExternalReExportJsonInput>>
external_star_exports
External packages fully re-exported via export * from 'pkg'
(ModuleJson.externalStarExports), in source order. The projected
names are unknown — the package isn't analyzed.
type string[]
has_external_star_exports
type boolean
has_any_re_exports
Whether the module re-exports anything in any form — same-name edges, star exports, or the external variants of both.
type boolean
constructor
type new (library: Library, module_json: { path: string; declarations?: ({ kind: "function"; name: string; returnType?: string | undefined; returnDescription?: string | undefined; parameters?: { ...; }[] | undefined; ... 14 more ...; genericParams?: { ...; }[] | undefined; } | ... 7 more ... | { ...; })[] | undefined; ... 7 more ...; partial?: boolean | undefined; }): Module
library
module_json
{ path: string; declarations?: ({ kind: "function"; name: string; returnType?: string | undefined; returnDescription?: string | undefined; parameters?: { name: string; type: string; optional?: boolean | undefined; rest?: boolean | undefined; description?: string | undefined; defaultValue?: string | undefined; proper...get_declaration_by_name
Look up a declaration by name within this module.
type (name: string): Declaration | undefined
name
stringDeclaration | undefined