client server
Summary: Migrating Server, Client and UninitializedClient to TypeScript Reviewed By: passy Differential Revision: D16687855 fbshipit-source-id: 402e4dbcd5d283d3e280d4d8b312662829457886
This commit is contained in:
committed by
Facebook Github Bot
parent
53c1eee641
commit
5f53087c7e
25
types/globals.tsx
Normal file
25
types/globals.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* Copyright 2018-present Facebook.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
* @format
|
||||
*/
|
||||
|
||||
export {};
|
||||
type RequestIdleHandle = number;
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user