Skips values which contains null or undefined for the given property path.
Narrows the type of each property in the path from T | null | undefined to T.
Example:
const x: Observable<{ a: { b: number | null | undefined} }>;
const z: Observable<{ a: { b: number } }> = x.pipe(
skipPathNil('a', 'b')
);
value { a: { b: 1 } } will pass through
value { a: null } will be skipped
value { a: { b: undefined } } will be skipped
With a path of just one property it does the same as skipPropertyNil.
Overloaded with up to 5 properties building the path to check.
Skips values which contains null or undefined for the given property path.
Narrows the type of each property in the path from T | null | undefined to T.
Example:
const x: Observable<{ a: { b: number | null | undefined} }>;
const z: Observable<{ a: { b: number } }> = x.pipe(
skipPathNil('a', 'b')
);
value { a: { b: 1 } } will pass through
value { a: null } will be skipped
value { a: { b: undefined } } will be skipped
With a path of just one property it does the same as skipPropertyNil.
Overloaded with up to 5 properties building the path to check.
Skips values which contains null or undefined for the given property path.
Narrows the type of each property in the path from T | null | undefined to T.
Example:
const x: Observable<{ a: { b: number | null | undefined} }>;
const z: Observable<{ a: { b: number } }> = x.pipe(
skipPathNil('a', 'b')
);
value { a: { b: 1 } } will pass through
value { a: null } will be skipped
value { a: { b: undefined } } will be skipped
With a path of just one property it does the same as skipPropertyNil.
Overloaded with up to 5 properties building the path to check.
Skips values which contains null or undefined for the given property path.
Narrows the type of each property in the path from T | null | undefined to T.
Example:
const x: Observable<{ a: { b: number | null | undefined} }>;
const z: Observable<{ a: { b: number } }> = x.pipe(
skipPathNil('a', 'b')
);
value { a: { b: 1 } } will pass through
value { a: null } will be skipped
value { a: { b: undefined } } will be skipped
With a path of just one property it does the same as skipPropertyNil.
Overloaded with up to 5 properties building the path to check.
Skips values which contains
nullorundefinedfor the given property path. Narrows the type of each property in the path fromT | null | undefinedtoT.Example:
value
{ a: { b: 1 } }will pass throughvalue
{ a: null }will be skippedvalue
{ a: { b: undefined } }will be skippedWith a path of just one property it does the same as skipPropertyNil.
Overloaded with up to 5 properties building the path to check.