Files
flipper/types/globals.tsx
Michel Weststrate 40bc957b21 Show uncatched errors to developers
Summary: To make (accidental) errors more visible to developers of Flipper, all uncaught and FBLogger logged errors will be shown in the UI and prefixed with `[DEV]`. This is only done in non-production builds

Reviewed By: jknoxville

Differential Revision: D18061174

fbshipit-source-id: 9dab0e8d34396b0cb421a4d4e6fc14c81447d190
2019-10-23 04:16:15 -07:00

47 lines
1.1 KiB
TypeScript

/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
import {StoreEnhancerStoreCreator} from 'redux';
import {ResizeObserver} from './ResizeObserver.d';
import {Store} from '../src/reducers';
export {};
type RequestIdleHandle = number;
declare global {
interface StoreEnhancerStateSanitizer {
stateSanitizer: Function;
}
interface Window {
flipperGlobalStoreDispatch: Store['dispatch'];
__REDUX_DEVTOOLS_EXTENSION__:
| undefined
| StoreEnhancerStoreCreator & StoreEnhancerStateSanitizer;
Flipper: {
init: () => void;
};
// rIC not supportedin TS: https://github.com/Microsoft/TypeScript/issues/21309
requestIdleCallback: (
callback: (deadline: {
didTimeout: boolean;
timeRemaining: () => number;
}) => void,
opts?: {
timeout: number;
},
) => RequestIdleHandle;
cancelIdleCallback: (handle: RequestIdleHandle) => void;
ResizeObserver: ResizeObserver;
}
}