I am unsure of the right name for a type like this, but will explain the use-case:
Given a function f
, that takes an argument of type T
(i.e. function f(t: T)
I would like to create the following class:
import defaults from 'defaults';
class Helper<B extends PartialDeep<T>> {
private base: B;
constructor(base: B) {
this.b = b;
}
// I want `DeepPartialDiff` to make optional anything that has been passed in the constructor, but keep required anything NOT passed in the constructor.
runF(overrides: DeepPartialDiff<T, B>): ReturnType<typeof f> {
return f(defaults(overrides, this.base));
}
}
No response
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too