Skip to content

Commit

Permalink
Add type for RootTagContext
Browse files Browse the repository at this point in the history
Summary:
This is exported from the RN entrypoint and documented on the RN website, so we should give types for it.

Changelog:
[General][Fixed] - Add type for RootTagContext

Reviewed By: christophpurrer

Differential Revision: D42040806

fbshipit-source-id: cb8cdf557098ddbe33c143b7ab5d80bda7f80a6e
  • Loading branch information
NickGerleman authored and Riccardo Cipolleschi committed Dec 19, 2022
1 parent f04f067 commit fd28032
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Libraries/ReactNative/RootTag.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* Copyright (c) Meta Platforms, Inc. and 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 type * as React from 'react';

export type RootTag = number;
export const RootTagContext: React.Context<RootTag>;
1 change: 1 addition & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ export * from '../Libraries/PushNotificationIOS/PushNotificationIOS';
export * from '../Libraries/ReactNative/AppRegistry';
export * from '../Libraries/ReactNative/I18nManager';
export * from '../Libraries/ReactNative/RendererProxy';
export * from '../Libraries/ReactNative/RootTag';
export * from '../Libraries/ReactNative/UIManager';
export * from '../Libraries/ReactNative/requireNativeComponent';
export * from '../Libraries/Settings/Settings';
Expand Down

0 comments on commit fd28032

Please sign in to comment.