module.svelte.ts

view source

Declarations
#

Module
#

module.svelte.ts view source

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

library

type Library

readonly $state.raw

module_json

type ModuleJsonInput

readonly $state.raw

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

$derived

path_import

Import-style path with ./ prefix.

type string

$derived

module_comment

type string | undefined

$derived

declarations

Array of Declaration instances. Filters out default exports.

type Declaration[]

$derived

url_api

API documentation URL for this module.

type string

$derived

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

$derived

url_github

GitHub source URL.

type string | undefined

$derived

has_declarations

Whether the module has renderable declarations (after the default-export filter in declarations).

type boolean

$derived

has_module_comment

type boolean

$derived

dependencies

Modules this imports (paths relative to src/lib).

type string[]

$derived

dependents

Modules that import this (paths relative to src/lib).

type string[]

$derived

has_dependencies

type boolean

$derived

has_dependents

type boolean

$derived

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; }[]

$derived

has_re_exports

type boolean

$derived

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[]

$derived

has_star_exports

type boolean

$derived

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>>

$derived

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; }[]

$derived

has_external_re_exports

type boolean

$derived

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>>

$derived

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[]

$derived

has_external_star_exports

type boolean

$derived

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

$derived

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

type Library

module_json

type { 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

type string
returns Declaration | undefined

Depends on
#

Imported by
#