Skip to content

Commit

Permalink
remove typescript overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperchupuDev committed Jun 20, 2024
1 parent a58825e commit 06cb753
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/classes/Detector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class Detector {
static nicknameRegexp = RegExp(`[${blocklist}]`, 'giu');
async detectNickname(member: GuildMember) {
const cleanNickname = member.displayName.replaceAll(/[.\-_ /\\()[\]]/giu, '');
const result = cleanNickname.matchAll(Detector.nicknameRegexp).toArray();
const result = [...cleanNickname.matchAll(Detector.nicknameRegexp)];

const clientMember = await member.guild.members.fetchMe();
if (
Expand Down
18 changes: 1 addition & 17 deletions src/util/overrides.d.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,4 @@
// TODO: remove this file when @types/node gets updated to v22 and typescript 5.5 releases
// TODO: remove this file once @types/node gets updated to v22
declare module 'node:fs/promises' {
export function glob(pattern: string): AsyncGenerator<string>;
}

declare interface ArrayConstructor {
fromAsync<T>(
iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>
): Promise<T[]>;

fromAsync<T, U>(
iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>,
mapFn: (value: Awaited<T>) => U,
thisArg?: unknown
): Promise<Awaited<U>[]>;
}

declare interface IterableIterator<T> {
toArray(): T[];
}

0 comments on commit 06cb753

Please sign in to comment.