diff --git a/types/apidoc/apidoc-tests.ts b/types/apidoc/apidoc-tests.ts index 04269e7f27..c501e5b820 100644 --- a/types/apidoc/apidoc-tests.ts +++ b/types/apidoc/apidoc-tests.ts @@ -1,22 +1,37 @@ import { createDoc } from 'apidoc'; const apidocOutput = createDoc({ + excludeFilters: [''], + includeFilters: [''], + src: '', dest: '', template: '', templateSingleFile: '', - debug: true, - single: true, - silent: true, - verbose: true, - simulate: true, - parse: true, - colorize: true, - markdown: true, config: '', apiprivate: true, + verbose: true, + single: true, + debug: true, + parse: true, + colorize: true, + filters: { aFilter: '' }, + languages: { aLanguage: '' }, + parsers: { aParser: '' }, + workers: { aWorker: '' }, + silent: true, + simulate: true, + markdown: true, + lineEnding: '', encoding: '', - excludeFilters: [], - includeFilters: [], + copyDefinitions: true, + filterBy: '', +}); + +if (typeof apidocOutput !== 'boolean') { + const { data, project } = apidocOutput; +} + +createDoc({ filters: { api: { postFilter: (parsedFiles, parsedFilenames) => { } @@ -42,11 +57,5 @@ const apidocOutput = createDoc({ workers: { work: {} }, - lineEnding: "LF", - copyDefinitions: false, - filterBy: '', + filterBy: [''], }); - -if (typeof apidocOutput !== 'boolean') { - const { data, project } = apidocOutput; -} diff --git a/types/apidoc/index.d.ts b/types/apidoc/index.d.ts index 7efc7255b3..7e4096c746 100644 --- a/types/apidoc/index.d.ts +++ b/types/apidoc/index.d.ts @@ -8,38 +8,35 @@ export interface ParsedFile { filename: string; extension: string; src: string; - blocks: Array<{ global: any; local: any; }>; } + export interface DocOptions { - dest?: string | string[]; - template?: string; - templateSingleFile?: string; - debug?: boolean; - single?: boolean; - silent?: boolean; - verbose?: boolean; - simulate?: boolean; - parse?: boolean; - colorize?: boolean; - markdown?: boolean; - config?: string; - apiprivate?: boolean; - encoding?: string; excludeFilters?: string[]; includeFilters?: string[]; - filters?: { + src?: string; + dest?: string; + template?: string; + templateSingleFile?: string; + config?: string; + apiprivate?: boolean; + verbose?: boolean; + single?: boolean; + debug?: boolean; + parse?: boolean; + colorize?: boolean; + filters?: Record | { [keys: string]: { postFilter: (parsedFiles: ParsedFile[], parsedFilenames: string[]) => void } }; - languages?: { + languages?: Record | { [language: string]: { docBlocksRegExp: RegExp; inlineRegExp: RegExp; } }; - parsers?: { + parsers?: Record | { parse: (content: string, source: string, messages: string) => { name: string; title: string; @@ -50,10 +47,14 @@ export interface DocOptions { markdownFields?: string[]; markdownRemovePTags?: string[]; }; - workers?: { + workers?: Record | { [keys: string]: any; }; + silent?: boolean; + simulate?: boolean; + markdown?: boolean; lineEnding?: string; + encoding?: string; copyDefinitions?: boolean; filterBy?: string | string[]; }