Skip to content

Commit

Permalink
fix: explicitly import tslib
Browse files Browse the repository at this point in the history
  • Loading branch information
favna committed Apr 10, 2023
1 parent 2bea7b4 commit c433c5b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'tslib';

export * from './lib/errors/LoaderError';
export * from './lib/errors/MissingExportsError';
export * from './lib/internal/RootScan';
Expand Down
2 changes: 1 addition & 1 deletion src/lib/errors/LoaderError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class LoaderError extends Error {
this.type = type;
}

public get name() {
public override get name() {
return `${super.name} [${this.type}]`;
}
}
2 changes: 1 addition & 1 deletion src/lib/structures/AliasPiece.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class AliasPiece<O extends AliasPieceOptions = AliasPieceOptions> extends
/**
* Defines the `JSON.stringify` behavior of this alias piece.
*/
public toJSON(): AliasPieceJSON {
public override toJSON(): AliasPieceJSON {
return {
...super.toJSON(),
aliases: this.aliases.slice()
Expand Down
8 changes: 4 additions & 4 deletions src/lib/structures/AliasStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ export class AliasStore<T extends AliasPiece> extends Store<T> {
* Looks up the name by the store, falling back to an alias lookup.
* @param key The key to look for.
*/
public get(key: string): T | undefined {
public override get(key: string): T | undefined {
return super.get(key) ?? this.aliases.get(key);
}

/**
* Checks whether a key is in the store, or is an alias
* @param key The key to check
*/
public has(key: string): boolean {
public override has(key: string): boolean {
return super.has(key) || this.aliases.has(key);
}

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

// Unload all aliases for the given piece:
Expand All @@ -50,7 +50,7 @@ export class AliasStore<T extends AliasPiece> extends Store<T> {
* @param piece The piece to be inserted into the store.
* @return The inserted piece.
*/
public async insert(piece: T) {
public override async insert(piece: T) {
for (const key of piece.aliases) {
this.aliases.set(key, piece);
}
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.base.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "@sapphire/ts-config"
"extends": "@sapphire/ts-config/extra-strict-without-decorators"
}

0 comments on commit c433c5b

Please sign in to comment.