diff --git a/src/index.tsx b/src/index.tsx index f5654591a..96582ba82 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -10,6 +10,7 @@ export {default as styled, keyframes} from 'react-emotion'; export * from './ui/index'; export {getStringFromErrorLike, textContent} from './utils/index'; +export * from './utils/jsonTypes'; export {default as GK} from './fb-stubs/GK'; export {default as createPaste} from './fb-stubs/createPaste'; export {internGraphPOSTAPIRequest, graphQLQuery} from './fb-stubs/user'; diff --git a/src/utils/jsonTypes.tsx b/src/utils/jsonTypes.tsx new file mode 100644 index 000000000..e3c383b26 --- /dev/null +++ b/src/utils/jsonTypes.tsx @@ -0,0 +1,16 @@ +/** + * 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 + */ + +export type JSON = JSONPrimitive | JSONArray | JSONObject; + +export type JSONPrimitive = null | boolean | number | string; + +export type JSONArray = JSON[]; + +export type JSONObject = {[key: string]: JSON};