Documentation
¶
Overview ¶
Package typescript implements the TypeScript source analyzer (import + member + identifier tracking).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TsAnalyzer ¶
func TsAnalyzer(opts ...Option) *tsAnalyzer
TsAnalyzer returns a TypeScript source analyzer (satisfies analyzer.Analyzer and analyzer.BoundaryProvider). Concrete pointer return so tests can call Boundaries without a type assertion; cmd uses the interface upcast.
Types ¶
type BoundaryStrategy ¶
type BoundaryStrategy string
BoundaryStrategy selects the granularity at which TypeScript packages are grouped.
const ( StrategyPackage BoundaryStrategy = "package" StrategyBarrel BoundaryStrategy = "barrel" StrategyDirectory BoundaryStrategy = "directory" )
Boundary strategies select the granularity at which packages are grouped.
type Option ¶
type Option func(*tsAnalyzer)
Option configures a tsAnalyzer.
func WithBoundaryStrategy ¶
func WithBoundaryStrategy(s BoundaryStrategy) Option
WithBoundaryStrategy sets the package-boundary strategy for the analyzer.
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
barrel
Package barrel implements the TypeScript barrel-file boundary strategy.
|
Package barrel implements the TypeScript barrel-file boundary strategy. |
|
directory
Package directory implements the TypeScript per-directory boundary strategy.
|
Package directory implements the TypeScript per-directory boundary strategy. |
|
packagejson
Package packagejson implements the TypeScript per-package.json boundary strategy.
|
Package packagejson implements the TypeScript per-package.json boundary strategy. |
|
tscore
Package tscore is the shared TypeScript parse + capture engine used by the boundary-strategy implementations.
|
Package tscore is the shared TypeScript parse + capture engine used by the boundary-strategy implementations. |
Click to show internal directories.
Click to hide internal directories.