File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ export * from './lib/utils/attach';
1616export * from './lib/utils/before-render' ;
1717export * from './lib/utils/is' ;
1818export * from './lib/utils/make' ;
19+ export * from './lib/utils/non-nullish' ;
1920export * from './lib/utils/object-events' ;
2021export * from './lib/utils/parameters' ;
2122export * from './lib/utils/resolve-ref' ;
Original file line number Diff line number Diff line change 1+ import { Injector , Signal } from '@angular/core' ;
2+ import { toObservable } from '@angular/core/rxjs-interop' ;
3+ import { assertInjector } from 'ngxtension/assert-injector' ;
4+ import { map } from 'rxjs' ;
5+
6+ export function injectNonNullish$ ( sig : Signal < unknown > , { injector } : { injector ?: Injector } = { } ) {
7+ return assertInjector ( injectNonNullish$ , injector , ( ) => toObservable ( sig ) . pipe ( map ( ( val ) => val != null ) ) ) ;
8+ }
You can’t perform that action at this time.
0 commit comments