Skip to content

Commit c743e0f

Browse files
committed
Update to typedoc@0.16.6
1 parent 990da0b commit c743e0f

File tree

10 files changed

+31
-44
lines changed

10 files changed

+31
-44
lines changed

example/package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"author": "",
1212
"license": "ISC",
1313
"devDependencies": {
14-
"typedoc-plugin-typescript-declaration": "^0.2.2"
14+
"typedoc-plugin-typescript-declaration": "^0.2.3"
1515
},
1616
"dependencies": {}
1717
}

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "typedoc-plugin-typescript-declaration",
3-
"version": "0.2.2",
3+
"version": "0.2.3",
44
"description": "Typedoc plugin to render to typescript declaration file",
55
"main": "dist/index.js",
66
"bin": {
@@ -49,6 +49,6 @@
4949
},
5050
"dependencies": {
5151
"make-dir": "^3.0.0",
52-
"typedoc": "^0.16.4"
52+
"typedoc": "^0.16.6"
5353
}
5454
}

src/keyof-plugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Context, Converter } from 'typedoc/dist/lib/converter';
22
import { DeclarationOption, ParameterType } from 'typedoc/dist/lib/utils/options/declaration';
3+
import { BindOption } from 'typedoc/dist/lib/utils';
34
import { ConverterComponent } from 'typedoc/dist/lib/converter/components';
45
import KeyOfCommentResolver from './convert/keyof-comment-resolver';
5-
import { bind } from './util/options';
66

77
export enum AddKeysTagOption {
88
off = 0,
@@ -29,7 +29,7 @@ export class KeyOfPlugin extends ConverterComponent {
2929
keyofCommentsOption,
3030
];
3131

32-
@bind(keyofCommentsOption)
32+
@BindOption(keyofCommentsOption.name)
3333
_mode!: AddKeysTagOption;
3434

3535
protected initialize() {

src/omit-tags-plugin.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Context, Converter } from 'typedoc/dist/lib/converter';
22
import { DeclarationOption, ParameterType } from 'typedoc/dist/lib/utils/options/declaration';
3+
import { BindOption } from 'typedoc';
34
import { ConverterComponent } from 'typedoc/dist/lib/converter/components';
45
import { Reflection } from 'typedoc/dist/lib/models';
5-
import { bind } from './util/options';
66

77
const omitTagOption = {
88
name: 'omitTag',
@@ -15,8 +15,8 @@ export class OmitTagsPlugin extends ConverterComponent {
1515
omitTagOption,
1616
];
1717

18-
@bind(omitTagOption)
19-
_omitTags: string[] | undefined;
18+
@BindOption(omitTagOption.name)
19+
_omitTags?: string[];
2020

2121
protected initialize() {
2222
this.listenTo(this.owner, {

src/typescript-declaration-plugin.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import * as fs from 'fs';
22
import * as path from 'path';
3+
import { BindOption, SourceFileMode } from 'typedoc/dist/lib/utils';
34
import { DeclarationOption, ParameterHint, ParameterType, TypeDocOptions } from 'typedoc/dist/lib/utils/options/declaration';
45
import ReflectionFormatter, { ReflectionSortFlags, sortMapping } from './render/reflection-formatter';
56
import { ProjectReflection } from 'typedoc/dist/lib/models';
67
import { Renderer } from 'typedoc/dist/lib/output/renderer';
78
import { RendererComponent } from 'typedoc/dist/lib/output/components';
89
import { RendererEvent } from 'typedoc/dist/lib/output/events';
9-
import { SourceFileMode } from 'typedoc/dist/lib/utils';
10-
import { bind } from './util/options';
1110
import mkdir from 'make-dir';
1211

1312
const declarationFileOption = {
@@ -38,13 +37,13 @@ export class TypeScriptDeclarationPlugin extends RendererComponent {
3837
sortOptionOption,
3938
];
4039

41-
@bind(declarationFileOption)
42-
_declarationFile: string | undefined;
40+
@BindOption(declarationFileOption.name)
41+
_declarationFile?: string;
4342

44-
@bind(declarationOnlyOption)
45-
_declarationOnly: boolean | undefined;
43+
@BindOption(declarationOnlyOption.name)
44+
_declarationOnly?: boolean;
4645

47-
@bind(sortOptionOption)
46+
@BindOption(sortOptionOption.name)
4847
_sortOption!: ReflectionSortFlags;
4948

5049
protected initialize() {

src/util/options.ts

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/version-filter-plugin.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { Context, Converter } from 'typedoc/dist/lib/converter';
22
import { DeclarationOption, ParameterType } from 'typedoc/dist/lib/utils/options/declaration';
3+
import { BindOption } from 'typedoc/dist/lib/utils';
34
import { ConverterComponent } from 'typedoc/dist/lib/converter/components';
45
import { Reflection } from 'typedoc/dist/lib/models';
56
import Version from './util/version';
67
import VersionFilter from './convert/version-filter';
7-
import { bind } from './util/options';
88

99
const maxVersionOption = {
1010
name: 'maxVersion',
@@ -17,8 +17,8 @@ export class VersionFilterPlugin extends ConverterComponent {
1717
maxVersionOption,
1818
];
1919

20-
@bind(maxVersionOption)
21-
_maxVersion: string | undefined;
20+
@BindOption(maxVersionOption.name)
21+
_maxVersion?: string;
2222

2323
private _version?: Version;
2424
private _excluded?: Reflection[];

tests/dynamic-tests.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import Version from '../src/util/version';
1111
import VersionFilter from '../src/convert/version-filter';
1212
import glob from 'glob';
1313
import mkdir from 'make-dir';
14+
import { resetReflectionID } from 'typedoc';
1415

1516
const writeOutput = process.env['DEBUG_MODE'] !== 'none';
1617

@@ -43,6 +44,8 @@ describe('Dynamic test suite', () => {
4344
const logOutput: string[] = [];
4445
const app = createApplication(logOutput);
4546

47+
resetReflectionID();
48+
4649
const project = app.convert([path.join(__dirname, testFile)]);
4750
const basename = testFile.replace(/(input|exact)(\.d)?\.ts$/i, '');
4851
const expectedFile = /exact\.d\.ts$/i.test(testFile) ? testFile : `${basename}expected.d.ts`;

0 commit comments

Comments
 (0)