UNPKG

just-scripts

Version:
64 lines 2.74 kB
import { TaskFunction } from 'just-task'; import type * as ApiExtractorTypes from '@microsoft/api-extractor'; /** * Options from `IExtractorConfigOptions` plus additional options specific to the task. */ export interface ApiExtractorOptions extends ApiExtractorTypes.IExtractorInvokeOptions { /** The project folder to be used for reporting output paths. */ projectFolder?: string; /** The config file path */ configJsonFilePath?: string; /** * @deprecated Update API Extractor and use option `newlineKind: 'os'`. */ fixNewlines?: boolean; /** * Callback after api-extractor is invoked. * @param result - Result of invoking api-extractor. Actual type is `ExtractorResult` from `@microsoft/api-extractor`. * @param extractorOptions - Options with which api-extractor was invoked. Actual type is `IExtractorInvokeOptions`. */ onResult?: (result: any, extractorOptions: any) => void; /** * Callback after the config file is loaded. * Provides the opportunity to modify the config before running API Extractor. */ onConfigLoaded?: (config: ApiExtractorTypes.IConfigFile) => void; } export declare function apiExtractorVerifyTask(options: ApiExtractorOptions): TaskFunction; /** @deprecated Use object param version */ export declare function apiExtractorVerifyTask(configJsonFilePath: string, extractorOptions: Omit<ApiExtractorOptions, 'configJsonFilePath'>): TaskFunction; /** * Updates the API extractor snapshot * * Sample config which should be saved as api-extractor.json: * ``` * { * "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", * "mainEntryPointFilePath": "<projectFolder>/lib/index.d.ts", * "docModel": { * "enabled": true * }, * "dtsRollup": { * "enabled": true * }, * "apiReport": { * "enabled": true * } * } * ``` */ export declare function apiExtractorUpdateTask(options: ApiExtractorOptions): TaskFunction; /** @deprecated Use object param version */ export declare function apiExtractorUpdateTask(configJsonFilePath: string, extractorOptions: Omit<ApiExtractorOptions, 'configJsonFilePath'>): TaskFunction; /** * Update the newlines of the API report file to be consistent with other files in the repo, * and remove trailing spaces. * @param apiFilePath - Path to the API report file * @param newlineOptions - Provide either `newline` to specify the type of newlines to use, * or `sampleFilePath` to infer the newline type from a file. */ export declare function fixApiFileNewlines(apiFilePath: string, newlineOptions: { sampleFilePath?: string; newline?: string; }): void; //# sourceMappingURL=apiExtractorTask.d.ts.map