storybook-addon-stencil
Version:
A Stencil compiler integration for Storybook.
34 lines (33 loc) • 1.07 kB
TypeScript
import ts, { type ParsedCommandLine, type Program } from "typescript";
export declare class ProgramService {
private memoBuild?;
readonly config: ParsedCommandLine;
readonly program: Program;
constructor();
/**
* Load typescript configuration.
* @returns {ParsedCommandLine}
*/
loadConfig(): ts.ParsedCommandLine;
/**
* Create a program instance from the loaded typescript configuration.
* @returns {Program}
*/
createProgram(): ts.Program;
/**
* Get the source file of a given file path.
* @param {string} fileName The file path.
* @returns {ts.SourceFile}
*/
getSourceFile(fileName: string): ts.SourceFile;
/**
* Provide the cached map of all Stencil components or create a new one.
* @returns Map<string, string>
*/
getComponents(): Promise<Map<string, string>>;
/**
* Create a map of all Stencil components using their tag name as key and the file path as value.
* @returns {Map<string, string>}
*/
private createComponentsMap;
}