mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
6e73304401
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/25680 This diff's adding real e2e tests for skeleton added in previous diff. It verifies many cases for codegen, which should generate cpp code. Reviewed By: rickhanlonii Differential Revision: D16279810 fbshipit-source-id: 4441dd0ed4d95476e4071fbd654ebfb8a47ecbfc
30 lines
821 B
JavaScript
30 lines
821 B
JavaScript
/**
|
|
* 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.
|
|
*
|
|
* @flow
|
|
* @format
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
|
|
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
|
|
|
|
export type GenericObject = Object;
|
|
type AnotherGenericObject = GenericObject;
|
|
|
|
export interface Spec extends TurboModule {
|
|
+getGenericObject: (arg: Object) => Object;
|
|
+getGenericObjectWithAlias: (arg: GenericObject) => AnotherGenericObject;
|
|
+getConstants: () => {|
|
|
const1: boolean,
|
|
const2: number,
|
|
const3: string,
|
|
|};
|
|
}
|
|
|
|
export default TurboModuleRegistry.getEnforcing<Spec>('SampleTurboModule');
|