refactor: update ErrTuple to have a generic type that defaults to any

This commit is contained in:
Derrick Hammer 2023-09-02 07:45:27 -04:00
parent 7e61534c7b
commit b2007a6c81
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ type ErrFn = (errMsg: string) => void;
// returned, the err should be 'null'. If an error is returned, the data field
// should generally be empty. Callers are expected to check the error before
// they access any part of the data field.
type ErrTuple = [data: any, err: Err];
type ErrTuple<T = any> = [data: T, err: Err];
// KernelAuthStatus is the structure of a message that gets sent by the kernel
// containing its auth status. Auth occurs in 5 stages.