import type * as TTypescript from 'typescript'; import { SyncHook } from 'tapable'; import type { ITerminal } from '@rushstack/terminal'; import type { HeftConfiguration, IHeftTaskSession, IHeftTaskPlugin } from '@rushstack/heft'; /** * The name of the plugin, as specified in heft-plugin.json * * @public */ export declare const PLUGIN_NAME: 'typescript-plugin'; /** * @beta */ export interface IEmitModuleKind { moduleKind: 'commonjs' | 'amd' | 'umd' | 'system' | 'es2015' | 'esnext'; outFolderName: string; jsExtensionOverride?: string; emitModulePackageJson?: boolean; } /** * @beta */ export interface IStaticAssetsCopyConfiguration { fileExtensions: string[]; excludeGlobs: string[]; includeGlobs: string[]; } /** * @beta */ export interface ITypeScriptConfigurationJson { /** * If provided, emit these module kinds in addition to the modules specified in the tsconfig. * Note that this option only applies to the main tsconfig.json configuration. */ additionalModuleKindsToEmit?: IEmitModuleKind[] | undefined; /** * If 'true', emit CommonJS output into the TSConfig outDir with the file extension '.cjs' */ emitCjsExtensionForCommonJS?: boolean | undefined; /** * If 'true', emit ESModule output into the TSConfig outDir with the file extension '.mjs' */ emitMjsExtensionForESModule?: boolean | undefined; /** * If true, enable behavior analogous to the "tsc --build" command. Will build projects referenced by the main project in dependency order. * Note that this will effectively enable \"noEmitOnError\". */ buildProjectReferences?: boolean; /** * If true, and the tsconfig has \"isolatedModules\": true, then transpilation will happen in parallel in a worker thread. */ useTranspilerWorker?: boolean; /** * If true, the TypeScript compiler will only resolve symlinks to their targets if the links are in a node_modules folder. * This significantly reduces file system operations in typical usage. */ onlyResolveSymlinksInNodeModules?: boolean; project?: string; /** * Configures additional file types that should be copied into the TypeScript compiler's emit folders, for example * so that these files can be resolved by import statements. */ staticAssetsToCopy?: IStaticAssetsCopyConfiguration; } /** * @beta */ export interface IPartialTsconfigCompilerOptions { outDir?: string; } /** * @beta */ export interface IPartialTsconfig { compilerOptions?: IPartialTsconfigCompilerOptions; } /** * @beta */ export interface IChangedFilesHookOptions { program: TTypescript.Program; changedFiles?: ReadonlySet; } /** * @beta */ export interface ITypeScriptPluginAccessor { readonly onChangedFilesHook: SyncHook; } /** * @beta */ export declare function loadTypeScriptConfigurationFileAsync(heftConfiguration: HeftConfiguration, terminal: ITerminal): Promise; /** * @beta */ export declare function loadPartialTsconfigFileAsync(heftConfiguration: HeftConfiguration, terminal: ITerminal, typeScriptConfigurationJson: ITypeScriptConfigurationJson | undefined): Promise; export default class TypeScriptPlugin implements IHeftTaskPlugin { accessor: ITypeScriptPluginAccessor; apply(taskSession: IHeftTaskSession, heftConfiguration: HeftConfiguration): void; private _getStaticAssetCopyOperationsAsync; private _getTypeScriptBuilderAsync; private _loadConfigAsync; } //# sourceMappingURL=TypeScriptPlugin.d.ts.map