Skip to content

Commit

Permalink
chore: Add warnings for deprecated usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit0 committed Mar 18, 2020
1 parent 19c65c3 commit 508f8ba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib/converter/plugins/CommentPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,8 @@ export class CommentPlugin extends ConverterComponent {
* @param tagName The name of the that that should be removed.
*/
static removeTags(comment: Comment | undefined, tagName: string) {
// Can't use a logger here, we don't have one.
console.warn('Using deprecated function removeTags. This function will be removed in the next minor release.');
comment?.removeTags(tagName);
}

Expand All @@ -367,6 +369,8 @@ export class CommentPlugin extends ConverterComponent {
* Warn in 0.17, remove in 0.18
*/
static removeReflections(project: ProjectReflection, reflections: Reflection[]) {
// Can't use a logger here, we don't have one.
console.warn('Using deprecated function removeReflections. This function will be removed in the next minor release.');
for (const reflection of reflections) {
project.removeReflection(reflection, true);
}
Expand All @@ -378,6 +382,8 @@ export class CommentPlugin extends ConverterComponent {
* Warn in 0.17, remove in 0.18
*/
static removeReflection(project: ProjectReflection, reflection: Reflection) {
// Can't use a logger here, we don't have one.
console.warn('Using deprecated function removeReflections. This function will be removed in the next minor release.');
project.removeReflection(reflection, true);
}

Expand Down
1 change: 1 addition & 0 deletions src/lib/utils/options/readers/typedoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export class TypeDocReader implements OptionsReader {

// deprecate: data.src is alias to inputFiles as of 0.16, warn in 0.17, remove in 0.19
if ('src' in data && !('inputFiles' in data)) {
logger.warn('The `src` configuration option has been deprecated in favor of `inputFiles` and will be removed in a future release.');
data['inputFiles'] = getStringArray(data['src']);
delete data['src'];
}
Expand Down

0 comments on commit 508f8ba

Please sign in to comment.