/** * Public entry point demonstrating the re-export forms svelte-docinfo tracks. * @module */ // same-name re-exports — recorded as `reExports` here // and `alsoExportedFrom` on the canonical declarations export {add, multiply, type MathConfig} from './math.js'; export {Counter} from './counter.svelte.js'; export {default as Calculator} from './Calculator.svelte'; export {default as Card} from './Card.svelte'; // renamed re-export — synthesizes an alias declaration with `aliasOf` export {add_vector as vector_add} from './math.js'; // namespace re-export — synthesizes a `namespace` declaration projecting shapes.ts export * as shapes from './shapes.js'; // direct external re-export — recorded on `externalReExports`, no declaration synthesized export type {Snippet} from 'svelte';
{ "path": "index.ts", "declarations": [ { "name": "Calculator", "kind": "component", "sourceLine": 10, "aliasOf": { "module": "Calculator.svelte", "name": "Calculator" }, "props": [ { "name": "result", "type": "number", "optional": true, "description": "Current result (bindable).", "defaultValue": "0", "bindable": true }, { "name": "config", "type": "MathConfig", "optional": true, "description": "Math configuration." }, { "name": "mode", "type": "\"add\" | \"multiply\"", "optional": true, "description": "Operation mode.", "defaultValue": "'add'" }, { "name": "disabled", "type": "boolean", "optional": true, "description": "Disable the calculator.", "defaultValue": "false" } ], "docComment": "Calculator component for demonstrating Svelte analysis. A component\ncomment documents the component itself and becomes the declaration's\n`docComment`; the separate `@module` comment below documents the file\nand becomes the module's `moduleComment`. Both use the HTML comment\nform here — see `Card.svelte` for the in-script JSDoc form of each." }, { "name": "Card", "kind": "component", "sourceLine": 11, "aliasOf": { "module": "Card.svelte", "name": "Card" }, "props": [ { "name": "title", "type": "string", "optional": true, "description": "Title rendered when no `header` snippet is provided." }, { "name": "header", "type": "Snippet<[title: string]>", "optional": true, "description": "Custom header content, receives the resolved title.", "parameters": [ { "name": "title", "type": "string" } ] }, { "name": "children", "type": "Snippet<[]>", "description": "Card body content." } ], "acceptsChildren": true, "docComment": "Card layout demonstrating `children` and snippet props —\n`acceptsChildren` and structured snippet parameters in the output.\nComponent docs via the in-script JSDoc form — attached to the `$props()`\ndeclaration, this block becomes the component's `docComment`, with no\n`@component` tag required (only the HTML form needs that tag). See\n`Calculator.svelte` for the HTML comment form." }, { "name": "vector_add", "kind": "function", "docComment": "Add vectors in place.", "typeSignature": "(target: Vector2, source: Vector2): void", "sourceLine": 14, "mutates": { "target": "modifies x and y fields" }, "aliasOf": { "module": "math.ts", "name": "add_vector" }, "parameters": [ { "name": "target", "type": "Vector2", "description": "vector to mutate" }, { "name": "source", "type": "Vector2", "description": "vector to add" } ], "returnType": "void" }, { "name": "shapes", "kind": "namespace", "sourceLine": 17, "module": "shapes.ts" } ], "moduleComment": "Public entry point demonstrating the re-export forms svelte-docinfo tracks.", "dependencies": [ "Calculator.svelte", "Card.svelte", "counter.svelte.ts", "math.ts", "shapes.ts" ], "reExports": [ { "name": "add", "module": "math.ts", "sourceLine": 8 }, { "name": "Counter", "module": "counter.svelte.ts", "sourceLine": 9 }, { "name": "MathConfig", "module": "math.ts", "typeOnly": true, "sourceLine": 8 }, { "name": "multiply", "module": "math.ts", "sourceLine": 8 } ], "externalReExports": [ { "name": "Snippet", "specifier": "svelte", "typeOnly": true, "sourceLine": 20 } ] }