refactor(SnowflakeUtil): clean up utils and improve perf (#7036)

This commit is contained in:
Antonio Román
2021-11-29 11:20:18 +01:00
committed by GitHub
parent fd63139b41
commit e59fac3fe3
3 changed files with 11 additions and 67 deletions

2
typings/index.d.ts vendored
View File

@@ -2205,7 +2205,6 @@ export class Util extends null {
private constructor();
public static archivedThreadSweepFilter<K, V>(lifetime?: number): SweepFilter<K, V>;
public static basename(path: string, ext?: string): string;
public static binaryToId(num: string): Snowflake;
public static cleanContent(str: string, channel: TextBasedChannels): string;
/** @deprecated Use {@link MessageOptions.allowedMentions} to control mentions in a message instead. */
public static removeMentions(str: string): string;
@@ -2225,7 +2224,6 @@ export class Util extends null {
public static cleanCodeBlockContent(text: string): string;
public static fetchRecommendedShards(token: string, options?: FetchRecommendedShardsOptions): Promise<number>;
public static flatten(obj: unknown, ...props: Record<string, boolean | string>[]): unknown;
public static idToBinary(num: Snowflake): string;
public static makeError(obj: MakeErrorOptions): Error;
public static makePlainError(err: Error): MakeErrorOptions;
public static mergeDefault(def: unknown, given: unknown): unknown;