Make OptionsFunc include the options in the typing for this

This commit is contained in:
thepaperpilot 2022-06-26 23:00:41 -05:00
parent 00eea1de78
commit 15fc88e247

View file

@ -42,7 +42,9 @@ export type Replace<T, S> = S & Omit<T, keyof S>;
* with "this" bound to what the type will eventually be processed into.
* Intended for making lazily evaluated objects.
*/
export type OptionsFunc<T, R = Record<string, unknown>, S = R> = () => T & Partial<R> & ThisType<S>;
export type OptionsFunc<T, R = Record<string, unknown>, S = R> = () => T &
Partial<R> &
ThisType<T & S>;
let id = 0;
/**