mirror of
https://github.com/jaronpate/unicord.git
synced 2026-10-18 21:47:40 +00:00
refactor: Simplify hydrator type signature in Context
This commit is contained in:
@@ -94,7 +94,7 @@ export class Context<D extends ContextData = ContextData> {
|
|||||||
*
|
*
|
||||||
* @returns A promise that resolves to a type guard function. The type guard function returns `true` if the data object was successfully hydrated, otherwise `false`.
|
* @returns A promise that resolves to a type guard function. The type guard function returns `true` if the data object was successfully hydrated, otherwise `false`.
|
||||||
*/
|
*/
|
||||||
public hydrator = async <T extends Hydrateable | Hydrated<Hydrateable, Array<Expectation>>, K extends Array<Expectation>>(data: T, expectations: K) => {
|
public hydrator = async <T extends Hydrateable, K extends Array<Expectation>>(data: T, expectations: K) => {
|
||||||
return hydrator<T, K>(data, expectations, this.client, this.api);
|
return hydrator<T, K>(data, expectations, this.client, this.api);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user