Make it something generic such as:
export type ApiObjectSpec<
T extends string = string,
U extends Record<T, YupTypes.AnySchema> = Record<string, YupTypes.AnySchema>,
V extends T = T,
> = ReturnType<
typeof getApiObjectSpec<T, U, V>
>;
The refactor should allow for typed arguments such as this
(apiObjectSpec: ApiObjectSpec) => { ... }
Make it something generic such as:
The refactor should allow for typed arguments such as this