Skip to content

Commit 61e6957

Browse files
committed
fix: fix types for extracter tree options
1 parent 03e6aed commit 61e6957

File tree

1 file changed

+10
-26
lines changed

1 file changed

+10
-26
lines changed

src/trees/extracter.ts

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ import * as fs from 'fs';
44
import * as path from 'path';
55

66
export interface ExtracterTreeOptions {
7-
/**
8-
* The root directory of the project to extract documentation from
9-
*/
10-
dir: string;
117
/**
128
* The path to the directory containing all the Pages to build, relative to `dir`. Defaults to `docs`
139
*/
@@ -17,35 +13,23 @@ export interface ExtracterTreeOptions {
1713
* Defaults to `src`
1814
*/
1915
sourceDirs?: string[];
16+
/**
17+
* The name of the project we are extracting docs from
18+
*/
19+
projectName: string;
20+
/**
21+
* The version string of the project we are extracting docs from
22+
*/
23+
projectVersion: string;
2024
}
2125

2226
export default class ExtracterTree extends Tree {
2327

24-
options: {
25-
/**
26-
* The name of the project we are extracting docs from
27-
*/
28-
projectName: string;
29-
/**
30-
* The version string of the project we are extracting docs from
31-
*/
32-
projectVersion: string;
33-
/**
34-
* The path to the directory containing all the Pages to build, relative to `dir`. Defaults to `docs`
35-
*/
36-
pagesDir: string;
37-
/**
38-
* An array of paths to the directories containing the source code to extract API docs from.
39-
* Defaults to `src`
40-
*/
41-
sourceDirs: string[];
42-
};
28+
options: ExtracterTreeOptions;
4329

4430
constructor(sourceTree: Tree | string, options: ExtracterTreeOptions) {
4531
super([ sourceTree ]);
46-
options.sourceDirs = options.sourceDirs || [ 'src' ];
47-
options.pagesDir = options.pagesDir || 'docs';
48-
this.options = <any>options;
32+
this.options = options;
4933
}
5034

5135
build() {

0 commit comments

Comments
 (0)