mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 20:13:30 +01:00
types: fix cache type fallback types (#6961)
This commit is contained in:
6
typings/index.d.ts
vendored
6
typings/index.d.ts
vendored
@@ -1177,11 +1177,11 @@ export type CacheTypeReducer<
|
||||
RawType = CachedType,
|
||||
PresentType = CachedType | RawType,
|
||||
Fallback = PresentType | null,
|
||||
> = State extends 'cached'
|
||||
> = [State] extends ['cached']
|
||||
? CachedType
|
||||
: State extends 'raw'
|
||||
: [State] extends ['raw']
|
||||
? RawType
|
||||
: State extends 'present'
|
||||
: [State] extends ['present']
|
||||
? PresentType
|
||||
: Fallback;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user