refactor(general): Clean up and add a logger (#587)

* feat(utils): Add logger

* chore: Clean up some classes and add more logging

* chore: Fix conflicts
This commit is contained in:
Luan
2024-01-25 19:01:28 -03:00
committed by GitHub
parent 7fbc37f9d1
commit e86a0daf45
65 changed files with 432 additions and 350 deletions

View File

@@ -1,3 +1,4 @@
import { Log } from '../../utils/index.js';
import { YTNode } from '../helpers.js';
import { Parser, type RawNode } from '../index.js';
import Button from './Button.js';
@@ -44,6 +45,7 @@ export default class Channel extends YTNode {
* Please use {@link Channel.subscriber_count} instead.
*/
get subscribers(): Text {
Log.warnOnce(Channel.type, 'Channel#subscribers is deprecated. Please use Channel#subscriber_count instead.');
return this.subscriber_count;
}
@@ -53,6 +55,7 @@ export default class Channel extends YTNode {
* Please use {@link Channel.video_count} instead.
*/
get videos(): Text {
Log.warnOnce(Channel.type, 'Channel#videos is deprecated. Please use Channel#video_count instead.');
return this.video_count;
}
}