Files
Rubén NorteandFacebook GitHub Bot 84a1211773 Strip all "bom" types that are actually not defined in RN (#49730)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49730

Changelog: [internal]

This removes all the types from "bom" that are actually not implemented in RN. For now, we're just stripping whole interfaces and not looking into specific methods/properties in interfaces that we do implement but not 100%.

`Performance`, `PerformanceObserver`, `MutationObserver` and `IntersectionObserver` are implemented but not stable yet, so they aren't exposed as globals in the types.

Reviewed By: huntie

Differential Revision: D70329185

fbshipit-source-id: 63bac619e100ca66b41df071df80dfa73d0f9651
2025-02-28 05:58:45 -08:00

29 lines
1013 B
JavaScript

/**
* 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.
*
* @flow strict-local
* @format
*/
import type {RNTesterModuleExample} from '../../types/RNTesterTypes';
import * as MutationObserverExample from './MutationObserverExample';
import * as VisualCompletionExample from './VisualCompletionExample/VisualCompletionExample';
export const framework = 'React';
export const title = 'MutationObserver';
export const category = 'UI';
export const documentationURL =
'https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver';
export const description = 'API to detect mutations in React Native nodes.';
export const showIndividualExamples = true;
export const examples: Array<RNTesterModuleExample> = [MutationObserverExample];
// $FlowExpectedError[cannot-resolve-name]
if (typeof IntersectionObserver !== 'undefined') {
examples.push(VisualCompletionExample);
}