Skip to content

Commit 508f8ba

Browse files
committed
chore: Add warnings for deprecated usage
1 parent 19c65c3 commit 508f8ba

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/lib/converter/plugins/CommentPlugin.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,8 @@ export class CommentPlugin extends ConverterComponent {
358358
* @param tagName The name of the that that should be removed.
359359
*/
360360
static removeTags(comment: Comment | undefined, tagName: string) {
361+
// Can't use a logger here, we don't have one.
362+
console.warn('Using deprecated function removeTags. This function will be removed in the next minor release.');
361363
comment?.removeTags(tagName);
362364
}
363365

@@ -367,6 +369,8 @@ export class CommentPlugin extends ConverterComponent {
367369
* Warn in 0.17, remove in 0.18
368370
*/
369371
static removeReflections(project: ProjectReflection, reflections: Reflection[]) {
372+
// Can't use a logger here, we don't have one.
373+
console.warn('Using deprecated function removeReflections. This function will be removed in the next minor release.');
370374
for (const reflection of reflections) {
371375
project.removeReflection(reflection, true);
372376
}
@@ -378,6 +382,8 @@ export class CommentPlugin extends ConverterComponent {
378382
* Warn in 0.17, remove in 0.18
379383
*/
380384
static removeReflection(project: ProjectReflection, reflection: Reflection) {
385+
// Can't use a logger here, we don't have one.
386+
console.warn('Using deprecated function removeReflections. This function will be removed in the next minor release.');
381387
project.removeReflection(reflection, true);
382388
}
383389

src/lib/utils/options/readers/typedoc.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ export class TypeDocReader implements OptionsReader {
6969

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

0 commit comments

Comments
 (0)