mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
🤖 Merge PR #46474 [@types/apidoc] Fix wrong args + add src param by @rigwild
* Update apidoc-tests.ts * Fix apidoc argument typings * Update apidoc-tests.ts * Update index.d.ts * Update apidoc-tests.ts
This commit is contained in:
parent
5651158378
commit
cdcf798f8b
@ -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;
|
||||
}
|
||||
|
||||
39
types/apidoc/index.d.ts
vendored
39
types/apidoc/index.d.ts
vendored
@ -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<string, string> | {
|
||||
[keys: string]: {
|
||||
postFilter: (parsedFiles: ParsedFile[], parsedFilenames: string[]) => void
|
||||
}
|
||||
};
|
||||
languages?: {
|
||||
languages?: Record<string, string> | {
|
||||
[language: string]: {
|
||||
docBlocksRegExp: RegExp;
|
||||
inlineRegExp: RegExp;
|
||||
}
|
||||
};
|
||||
parsers?: {
|
||||
parsers?: Record<string, string> | {
|
||||
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<string, string> | {
|
||||
[keys: string]: any;
|
||||
};
|
||||
silent?: boolean;
|
||||
simulate?: boolean;
|
||||
markdown?: boolean;
|
||||
lineEnding?: string;
|
||||
encoding?: string;
|
||||
copyDefinitions?: boolean;
|
||||
filterBy?: string | string[];
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user