Skip to content

Commit

Permalink
Merge branch 'enhancement/lavalink-structures' of https://github.com/…
Browse files Browse the repository at this point in the history
…shipgirlproject/Shoukaku into enhancement/lavalink-structures
  • Loading branch information
0t4u committed Aug 13, 2024
2 parents fc13cf7 + 12de3b9 commit c5f995e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/Utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@ export type OmitNested<I extends {}, K extends keyof I, T extends keyof NonNulla
[key in keyof I]: key extends K ? Omit<I[key], T> : I[key];
};

/**
* @see https://github.com/microsoft/TypeScript/issues/43505#issuecomment-1686128430
*/
export type NumericRange<

Check failure on line 10 in src/Utils.ts

View workflow job for this annotation

GitHub Actions / build

Duplicate identifier 'NumericRange'.

Check failure on line 10 in src/Utils.ts

View workflow job for this annotation

GitHub Actions / compile (18.x)

Duplicate identifier 'NumericRange'.

Check failure on line 10 in src/Utils.ts

View workflow job for this annotation

GitHub Actions / compile (20.x)

Duplicate identifier 'NumericRange'.

Check failure on line 10 in src/Utils.ts

View workflow job for this annotation

GitHub Actions / compile (18.x)

Duplicate identifier 'NumericRange'.

Check failure on line 10 in src/Utils.ts

View workflow job for this annotation

GitHub Actions / build

Duplicate identifier 'NumericRange'.

Check failure on line 10 in src/Utils.ts

View workflow job for this annotation

GitHub Actions / compile (20.x)

Duplicate identifier 'NumericRange'.
start extends number,
end extends number,
arr extends unknown[] = [],
acc extends number = never,
> = arr['length'] extends end
? acc | start | end
: NumericRange<start, end, [...arr, 1], arr[start] extends undefined ? acc : acc | arr['length']>;

export type OmitNested<I extends {}, K extends keyof I, T extends keyof NonNullable<I[K]>> = {

Check failure on line 19 in src/Utils.ts

View workflow job for this annotation

GitHub Actions / build

Duplicate identifier 'OmitNested'.

Check failure on line 19 in src/Utils.ts

View workflow job for this annotation

GitHub Actions / compile (18.x)

Duplicate identifier 'OmitNested'.

Check failure on line 19 in src/Utils.ts

View workflow job for this annotation

GitHub Actions / compile (20.x)

Duplicate identifier 'OmitNested'.

Check failure on line 19 in src/Utils.ts

View workflow job for this annotation

GitHub Actions / compile (18.x)

Duplicate identifier 'OmitNested'.

Check failure on line 19 in src/Utils.ts

View workflow job for this annotation

GitHub Actions / build

Duplicate identifier 'OmitNested'.

Check failure on line 19 in src/Utils.ts

View workflow job for this annotation

GitHub Actions / compile (20.x)

Duplicate identifier 'OmitNested'.
[key in keyof I]: key extends K ? Omit<I[key], T> : I[key];
};

/**
* @see https://github.com/microsoft/TypeScript/issues/43505#issuecomment-1686128430
*/
Expand Down

0 comments on commit c5f995e

Please sign in to comment.