Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
isAuthorized:
/**
* @TODO 19-06-01 Check if Authorization type can be indexed with StopName type.
* See https://github.com/Microsoft/TypeScript/issues/2491.
*/
// @ts-ignore
!!authorizations[name] && (last(acc) ? last(acc).isAuthorized : true),
isFullScreen,
name,
});
return acc;
}, [])
)
);
stack = fromStream(
this.progress$.pipe(
map(progressStopsList => progressStopsList.filter(stop => !stop.isFullScreen))
),
[]
);
fullScreenStackProperties$ = this.progress$.pipe(
map(progressStopsList => ({
canalId: this.canalId,
fullScreenStack: progressStopsList.filter(stop => stop.isFullScreen),
})),
distinctUntilChanged(
({ fullScreenStack: previousFullScreenStack }, { fullScreenStack: nextFullScreenStack }) =>
previousFullScreenStack.filter(stop => stop.isAuthorized).length ===
nextFullScreenStack.filter(stop => stop.isAuthorized).length
)
export function throttleGet(time: number, getter: () => T): T {
if(tcache.has(getter)) {
return tcache.get(getter)!.current;
}
const ob = Rx.Observable.from(mu.toStream(getter));
const ob2 = ob.debounceTime(time); //.merge(ob.delay(time).sampleTime(time));
const v = mu.fromStream(ob2, mobx.untracked(getter));
tcache.set(getter, v);
return v.current;
}
import React, { Component as ReactComponent, Fragment } from 'react';
import { View, StyleSheet } from 'react-native';
import { Observer } from 'mobx-react';
import { fromStream } from 'mobx-utils';
import { Navigation } from './Navigation';
export class FullScreenPortal extends ReactComponent {
fullScreenStack = fromStream(Navigation.instance.fullScreenDelegate.fullSceenStack$);
render() {
return (