From 26e1819a4315e8bbf2fc104aa9124974102de7c8 Mon Sep 17 00:00:00 2001 From: Riccardo Date: Thu, 17 Mar 2022 19:18:32 +0000 Subject: [PATCH] Use @flow annotation and fix syntax (#3016) --- docs/new-architecture-library-intro.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/new-architecture-library-intro.md b/docs/new-architecture-library-intro.md index b11ca4743d6..c2830530794 100644 --- a/docs/new-architecture-library-intro.md +++ b/docs/new-architecture-library-intro.md @@ -31,7 +31,7 @@ Currently, this guide is written under the assumption that you will be using [Fl The following is a basic JavaScript spec template, written using the [Flow](https://flow.org/) syntax. ```ts -'use strict'; +// @flow import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; import {TurboModuleRegistry} from 'react-native'; @@ -40,7 +40,7 @@ export interface Spec extends TurboModule { +getConstants: () => {||}; // your module methods go here, for example: - +getString(id: string): Promise; + getString(id: string): Promise; } export default (TurboModuleRegistry.get(''): ?Spec);