library.svelte.ts

Declarations
#

2 declarations

view source

Library
#

library.svelte.ts view source

Rich runtime representation of a library.

Wraps LibraryJson with computed properties and provides the root of the API documentation hierarchy: Library → modules → declarations

see also

  • module.svelte.ts for Module class

  • declaration.svelte.ts for Declaration class

library_json

type LibraryJson

readonly

package_json

source_json

name

repo_name

repo_url

owner_name

homepage_url

logo_url

logo_alt

npm_url

changelog_url

published

org_url

Organization URL (e.g., 'https://github.com/ryanatkn').

modules

All modules as rich Module instances.

modules_sorted

All modules sorted alphabetically by path.

declarations

All declarations across all modules as a flat array.

declaration_map

Declaration lookup map by name. Provides O(1) lookup.

constructor

type new (library_json: LibraryJson): Library

library_json
type LibraryJson

lookup_declaration

Look up a declaration by name.

type (name: string): Declaration | undefined

name
type string
returns Declaration | undefined

has_declaration

Check if a declaration exists.

type (name: string): boolean

name
type string
returns boolean

lookup_module

Look up a module by its canonical path.

type (path: string): Module | undefined

path
type string
returns Module | undefined

search_declarations

Search declarations by query string with multi-term AND logic.

type (query: string): Declaration[]

query
type string
returns Declaration[]

library_context
#

library.svelte.ts view source

{ get: (error_message?: string | undefined) => Library; get_maybe: () => Library | undefined; set: (value: Library) => Library; }

Depends on
#

Imported by
#