DefSource
Where definitions come from: the store, possibly overlaid with not-yet-added scratch definitions.
import type { DefRecord } from "#codebase/tcmts/core/types"; import type { Kept } from "#codebase/tcmts/loader"; export interface DefSource { get(hash: string): DefRecord | undefined; members(componentHash: string): DefRecord[]; /** current full name on the branch, if any */ nameOf(hash: string): string | undefined; /** * Where a definition reads as you'd look at it: a file and the (0-based) line its declaration starts on there. * Generated modules carry a source map to it, so stack traces and debuggers show that file. */ viewOf?(hash: string): { file: string; line: number; inserts?: number[] } | undefined; /** the directory views are in (a branch's own): a module whose source maps lead to another is rendered again */ views?: string; /** * A constant's value, if it's pure and was evaluated before: kept, so it isn't computed again. Null if it isn't * kept (it isn't pure, or its value can't be written as code); undefined if that isn't known yet. */ kept?(hash: string): Kept | null | undefined; /** evaluate these constants, whose modules are written, and keep what can be kept (`kept` says, after) */ keep?(hashes: string[]): void; }
uses
used by
- tcmts.cli.codebase.Codebase
- tcmts.cli.codebase.CodebaseCore
- tcmts.cli.config.Evaluating
- tcmts.cli.effects.reaches
- tcmts.cli.kept.keepValues
- tcmts.cli.kept.stateless
- tcmts.cli.kept.usesPackages
- tcmts.cli.pack.pack
- tcmts.cli.testing.evaluateCached
- tcmts.cli.testing.runCached
- tcmts.cli.vitest.keysForResults
- tcmts.cli.vitest.prepareTestRun
- tcmts.cli.vitest.runTestsWithVitest
- tcmts.cli.web.cacheableComponents
- tcmts.loader.evaluateWatches
- tcmts.loader.materialize
- tcmts.loader.moduleFile
- tcmts.loader.render
- tcmts.loader.run
- tcmts.loader.runStreaming
- tcmts.loader.runTests
- tcmts.loader.writePairModule
- tcmts.loader.writeRunner
- tcmts.loader.writeShim