New: Improve the type of val()

This commit is contained in:
Aria Minaei 2021-07-02 20:47:25 +02:00
parent 6ac6aa87d7
commit 001c50c13d

View file

@ -227,6 +227,8 @@ export const val = <P>(
? T ? T
: P extends IDerivation<infer T> : P extends IDerivation<infer T>
? T ? T
: P extends undefined | null
? P
: unknown => { : unknown => {
if (isPointer(pointerOrDerivationOrPlainValue)) { if (isPointer(pointerOrDerivationOrPlainValue)) {
return valueDerivation( return valueDerivation(