Skip to content

Commit c433c5b

Browse files
committed
fix: explicitly import tslib
1 parent 2bea7b4 commit c433c5b

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

src/index.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import 'tslib';
2+
13
export * from './lib/errors/LoaderError';
24
export * from './lib/errors/MissingExportsError';
35
export * from './lib/internal/RootScan';

src/lib/errors/LoaderError.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export class LoaderError extends Error {
1818
this.type = type;
1919
}
2020

21-
public get name() {
21+
public override get name() {
2222
return `${super.name} [${this.type}]`;
2323
}
2424
}

src/lib/structures/AliasPiece.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class AliasPiece<O extends AliasPieceOptions = AliasPieceOptions> extends
2525
/**
2626
* Defines the `JSON.stringify` behavior of this alias piece.
2727
*/
28-
public toJSON(): AliasPieceJSON {
28+
public override toJSON(): AliasPieceJSON {
2929
return {
3030
...super.toJSON(),
3131
aliases: this.aliases.slice()

src/lib/structures/AliasStore.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ export class AliasStore<T extends AliasPiece> extends Store<T> {
1515
* Looks up the name by the store, falling back to an alias lookup.
1616
* @param key The key to look for.
1717
*/
18-
public get(key: string): T | undefined {
18+
public override get(key: string): T | undefined {
1919
return super.get(key) ?? this.aliases.get(key);
2020
}
2121

2222
/**
2323
* Checks whether a key is in the store, or is an alias
2424
* @param key The key to check
2525
*/
26-
public has(key: string): boolean {
26+
public override has(key: string): boolean {
2727
return super.has(key) || this.aliases.has(key);
2828
}
2929

@@ -32,7 +32,7 @@ export class AliasStore<T extends AliasPiece> extends Store<T> {
3232
* @param name The name of the file to load.
3333
* @return Returns the piece that was unloaded.
3434
*/
35-
public unload(name: string | T): Promise<T> {
35+
public override unload(name: string | T): Promise<T> {
3636
const piece = this.resolve(name);
3737

3838
// Unload all aliases for the given piece:
@@ -50,7 +50,7 @@ export class AliasStore<T extends AliasPiece> extends Store<T> {
5050
* @param piece The piece to be inserted into the store.
5151
* @return The inserted piece.
5252
*/
53-
public async insert(piece: T) {
53+
public override async insert(piece: T) {
5454
for (const key of piece.aliases) {
5555
this.aliases.set(key, piece);
5656
}

tsconfig.base.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"extends": "@sapphire/ts-config"
2+
"extends": "@sapphire/ts-config/extra-strict-without-decorators"
33
}

0 commit comments

Comments
 (0)