Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36591
If any of the properties used in event-emitter codegen conflict with `event` or `payload`, the generated code will fail to build, even if this generated code isn't used. Since these are quite common keys, prefix them with `$` (still valid C++) to avoid conflicts.
Changelog: [General][Fixed] Resolved property name conflicts in event-emitter codegen
Reviewed By: cipolleschi
Differential Revision: D44274619
fbshipit-source-id: 45e67850c49e082d8f9b1f85bb632d45a9fd4f1d
Summary:
Task from https://github.com/facebook/react-native/issues/34872
> [Codegen 80] Convert the emitCommonTypes implementation from a switch based implementation to a dictionary based one
## Changelog:
[Internal] [Changed] - Convert the emitCommonTypes implementation from a switch based implementation to a dictionary based one
Pull Request resolved: https://github.com/facebook/react-native/pull/36549
Test Plan: `yarn test react-native-codegen`
Reviewed By: NickGerleman
Differential Revision: D44244901
Pulled By: rshest
fbshipit-source-id: 50712724c72aad3bd1dae3e7c381242c4913a236
Summary:
> [Codegen 92] The getCommandOptions function in parsers/typescript/components/options.js and parsers/flow/components/options.js is the same. move it in parser-commons and use it in the original files. If the file two options.js files are empty, delete them.
> [Codegen 93] The getOptions function in parsers/typescript/components/options.js and parsers/flow/components/options.js is the same. move it in parser-commons and use it in the original files. If the file two options.js files are empty, delete them.
Part of Issue https://github.com/facebook/react-native/issues/34872
## Changelog:
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[Internal][Changed] - Move getCommandOptions and getOptions to parsers commons from parsers components options
Pull Request resolved: https://github.com/facebook/react-native/pull/36413
Test Plan: `yarn jest react-native-codegen`
Reviewed By: rshest
Differential Revision: D43957023
Pulled By: cipolleschi
fbshipit-source-id: 4f8bf6f8fe69b20d0fb976afee7da244ef634e12
Summary:
> [Codegen 78 - Assigned to Pranav-yadav] It depends on [Codegen 75][Codegen 76][Codegen 77] Extract the logic that emits Partial values in an emitPartial function, which takes the Parsers as parameter.
>[Codegen 79 - Assigned to Pranav-yadav] It depends on [Codegen 78] Extract the basic cases logics (case Stringish, case Int32, case Double, ..., case Partial. `Flow` lines and `TypeScript` lines into a function emitCommonTypes in `parsers-primitives.js`. Make sure that the default case returns `null`. Call this function in the default: case `Flow`, `TypeScript` of the `index.js` file: if the function return something, return that from the default case; otherwise if the `emitCommonTypes` returns `null`, keep the current default implementation (throw the error).
### Changes
- merged TS & Flow parsers' logic for `Partial` case to `emitPatial` fn
- merged TS & Flow parsers' logic for below cases:
- `Stringish`
- `Int32`
- `Double`
- `Float`
- `UnsafeObject`
- `Object`
- `Partial`
- into an `emitCommonTypes` fn into `parsers-primitives.js`
- add **_tests_** for `emitPartial` and `emitCommonTypes` fn's
- add `getAnnotatedElementProperties` fn to parser & impl to both TS & Flow parsers
## Changelog:
[INTERNAL] [CHANGED] - Merge TS & Flow parsers' logic for `Partial` case to `emitPatial` fn & `commonTypes` cases into `emitCommonTypes` fn
Pull Request resolved: https://github.com/facebook/react-native/pull/36450
Test Plan: - `yarn lint && yarn run flow && yarn jest react-native` ⇒ �
Reviewed By: rshest
Differential Revision: D44132308
Pulled By: cipolleschi
fbshipit-source-id: f965e85ecc5d94e57ad85334ce565a55c512fde4
Summary:
>[Codegen 95] Extract the `defaultExports.forEach(statement =>` (Flow, TS) function in `parser-commons`, so that it accept a Parser parameter to unify the behaviors between flow and typescript. The Parser object needs to be enriched with all the methods to extract the required information from the Node, if they are not there yet.
### Changes
- merged TS & Flow parsers' logic for `defaultExports.forEach(statement =>` of `/components/index.js:findComponentConfig()` into;
- `findNativeComponentType` fn to `parsers-commons.js`
- add `getTypeArgumentParamsFromDeclaration` & `getNativeComponentType` fn's
- add **_tests_** for getTypeArgumentParamsFromDeclaration & `getNativeComponentType` fn's
## Changelog
[INTERNAL] [CHANGED] - Merge `defaultExports.forEach(statement => ...` (Flow, TS) to `findNativeComponentType` fn in `parser-commons.js`
Pull Request resolved: https://github.com/facebook/react-native/pull/36466
Test Plan: - `yarn lint && yarn run flow && yarn jest react-native` ⇒ �
Reviewed By: rshest
Differential Revision: D44088862
Pulled By: cipolleschi
fbshipit-source-id: 91bf0edcd53b2e054160af34d7c128355c178b26
Summary:
The supported `CodegenTypes` aren't provided in the docs, which leads to many issues for developers working to transition native components to support Fabric.
However, explicit error messages are provided in many cases (e.g., to use specific numeric types instead of `number` attributes or to remove nested optionals in arrays).
This isn't the case for the common use case of TypeScript functions, which are very commonly used for event handlers in native components (such as `onChange`), forcing devs to search their way through the `react-native` codebase until they find [this file](https://github.com/facebook/react-native/blob/681d7f8113d2b5e9d6966255ee6c72b50a7d488a/Libraries/Types/CodegenTypes.js#L18).
By providing an explicit error message, we can significantly improve developer experience for those working to transition libraries/components, leading to higher Fabric adoption.
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[GENERAL] [ADDED] - Create explicit error message for TypeScript functions used as props in Codegen components, redirecting devs to the supported function types `BubblingEventHandler` and `DirectEventHandler`.
Pull Request resolved: https://github.com/facebook/react-native/pull/36498
Test Plan:
* `yarn run lint` shows no errors
* no impact on `yarn && yarn jest react-native-codegen`, which failed 362 tests before and after my changes.
Reviewed By: cipolleschi, sshic
Differential Revision: D44132960
Pulled By: dmytrorykun
fbshipit-source-id: d805ec8403613bf4e070cbd2904ff5a2648ec5fc
Summary:
- Add .d.ts files for generators
- export each generators because `react-native-windows` need its own selection of generators.
## Changelog
[GENERAL] [CHANGED] - Add minimum necessary .d.ts files to react-native-codegen (2)
Pull Request resolved: https://github.com/facebook/react-native/pull/36397
Test Plan:
`npm run build` in `packages/react-native-codegen` and see all .d.ts files appear in `lib`.
Checked .d.ts file in typescript playground.
Reviewed By: rshest
Differential Revision: D43941811
Pulled By: cipolleschi
fbshipit-source-id: 28f5bd56f27531ecf25223620a580358018b779d
Summary:
`Partial` is the new name of `$Partial`
Changelog: [Internal]
Reviewed By: SamChou19815
Differential Revision: D43993220
fbshipit-source-id: 38e8a6bcfa559857b2ab88efee6b904b387bdc0d
Summary:
Part of Codegen Issue https://github.com/facebook/react-native/issues/34872
> [Codegen 88] Move the Visitor.js file from parsers/flow/Visitor.js to parser-promitives.js. Copy the TSInterfaceDeclaration(node: $FlowFixMe) function and add it to the Visitor.js just copied. Remove the parsers/typescript/Visitor.js. Make sure we use the same Visitor in both parsers. (We will end up with a Visitor that is the union of the two, being able to handle both Flow and TS. In this specific case, this trade-off make sense as it allows us to remove one file, several duplicated lines for a small price.)
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[Internal][Changed] - Extract Visitor function to parsers primitives and remove both parsers visitor files
Pull Request resolved: https://github.com/facebook/react-native/pull/36459
Test Plan:
```
yarn jest
yarn flow
yarn lint
yarn format-check
```
Reviewed By: cortinico
Differential Revision: D44021825
Pulled By: cipolleschi
fbshipit-source-id: ea465404830402c44081143ee0539107dc75776c
Summary:
This PR adds a `functionTypeAnnotation` function to the codegen Parser class and implements it in the Flow and TypeScript parsers as requested on https://github.com/facebook/react-native/issues/34872, refactoring the `throwIfModuleTypeIsUnsupported` function to accept a `Parser` instead of a `ParserType` and use the newly created function instead of the `if (language)` logic.
## Changelog
[Internal] [Added] - Add `functionTypeAnnotation` to codegen Parser class
Pull Request resolved: https://github.com/facebook/react-native/pull/36468
Test Plan:
Run `yarn jest react-native-codegen` and ensure CI is green

Reviewed By: cipolleschi
Differential Revision: D44056853
Pulled By: rshest
fbshipit-source-id: f22b9efe53df16f7916eb1a9cea8b9531f1194f5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36345
`exactOptionalPropertyTypes` is a TypeScript 4.4+ option set by users which changes behavior of optional properties, to disable accepting explicit `undefined`.
This is not enabled when using `--strict`, and is stricter than Flow, leading to most of the typings having an `| undefined` unique to TypeScript (added with https://github.com/DefinitelyTyped/DefinitelyTyped/commit/694c663a9486dbe7794d5eb894a691ee9ded318a).
We have not always followed this (I have myself previously assumed the two are equivalent). We can enforce that the convention is followed with a plugin `eslint-plugin-redundant-undefined`. This forces us to declare that every optional property accepts an explicit undefined (which Flow would allow). Alternatively, if we do not want to support this, we can enable the existing dtslint rule `no-redundant-undefined`.
Changelog:
[General][Fixed] - Enforce compatibility with `exactOptionalPropertyTypes`
Reviewed By: lunaleaps
Differential Revision: D43700862
fbshipit-source-id: 996094762b28918177521a9471d868ba87f0f263
Summary:
Part of Umbrella https://github.com/facebook/react-native/issues/34872
> [**Codegen 84** - assigned to Pranav-yadav] It depends on [Codegen 83] export the parseModuleName anonymous function (Flow, TypeScript) in a common parseModuleName function in the parsers-commons.js file.
- merged Parse Module-Name _**anon**_ fn of `Flow` & `TS` parsers; into a common `parseModuleName` fn in the `parsers-commons.js`
- added **tests** for `parseModuleName` fn from `parsers-commons.js`
- added `callExpressionTypeParameters` method to **_parsers_**
- added **tests** for `callExpressionTypeParameters` method of _parsers_
- used `parser.callExpressionTypeParameters` method in `parseModuleName` fn
PS: fixed merge conflicts several times :(
Overall :)
## Changelog
[INTERNAL] [CHANGED] - Merge Parse-Module-Name anon fn of `Flow` & `TS` and add `callExpressionTypeParameters` method to **_parsers_**
Pull Request resolved: https://github.com/facebook/react-native/pull/36297
Test Plan: - `yarn lint && yarn run flow && yarn test react-native-codegen` ==> ✅
Reviewed By: rshest
Differential Revision: D43694563
Pulled By: cipolleschi
fbshipit-source-id: 99cf40ada0a567cd9ff91078f66fd4ac3684f7cc
Summary:
This will publish several changes we have pending on main, specifically changes to React Native Gradle Plugin which are needed to unblock nightlies.
#publish-packages-to-npm
## Changelog
[INTERNAL] - Bumping all the changes we have on main
Pull Request resolved: https://github.com/facebook/react-native/pull/36355
Test Plan: n/a
Reviewed By: hoxyq
Differential Revision: D43733634
Pulled By: cortinico
fbshipit-source-id: 9c041f7557cd8e494dfc942ae89e13e55353bb48
Summary:
This PR is task 74 from https://github.com/facebook/react-native/issues/34872:
> Move getTypes functions from utils.js to specific Parsers. Right now we have two Parser classes that takes care of the language specific details and two utils files that contains similar logic. We would like to move everything under the Parsers classes for better OOP architecture and to encourage code-reuse.
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[Internal] [Changed] - Replace getTypes functions with parser specific methods
Pull Request resolved: https://github.com/facebook/react-native/pull/36225
Test Plan: I tested using Jest and Flow commands.
Reviewed By: rshest
Differential Revision: D43453454
Pulled By: cipolleschi
fbshipit-source-id: 0eebcb55e1af3319e2c35bb462980046329a2c09
Summary:
Task from https://github.com/facebook/react-native/issues/34872
> [Codegen 82] Move isModuleInterface function (Flow, TypeScript) to the Flow and TypeScript parsers.
## Changelog
[INTERNAL] [CHANGED] - Moved isModuleInterface function to to the Flow and TypeScript parsers.
Pull Request resolved: https://github.com/facebook/react-native/pull/36268
Test Plan: ` yarn test react-native-codegen`
Reviewed By: christophpurrer
Differential Revision: D43535948
Pulled By: rshest
fbshipit-source-id: 7a2db05008783499168b0ce3fa58fedbac2b4e79
Summary:
> [Codegen 85] The parses/flow/components/schema.js and parses/typescript/components/schema.js are the same. Move the schema.js from the one of the two folders to the parsers common root. Delete the other. Update the references to use the shared file.
Part of the Codegen ☂️ Issue https://github.com/facebook/react-native/issues/34872
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[Internal] [Changed] - Consolidated the schema.js files for parses/flow/components and parses/typescript/components to a common root.
Pull Request resolved: https://github.com/facebook/react-native/pull/36219
Test Plan: Run ```yarn jest react-native-codegen```
Reviewed By: christophpurrer
Differential Revision: D43444666
Pulled By: cipolleschi
fbshipit-source-id: 24d791fd3a8110730d3f6054497ea3a31549a5a5
Summary:
We do have a lot of changes on `main` to ship to nightlies. This change bump all the packages with pending changes.
## Changelog
[INTERNAL] [CHANGED] - [ci][monorepo] bump package versions
Pull Request resolved: https://github.com/facebook/react-native/pull/36184
Test Plan: Will rely on CI run.
Reviewed By: hoxyq
Differential Revision: D43363981
Pulled By: cortinico
fbshipit-source-id: eba5152dbe007eb3fad43f9088d145b3741fd94e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36030
Generate enum types in c++ turbo modules.
For enums in the ts schema file such as:
```
export enum NumEnum {
ONE = 1,
TWO = 2,
}
```
This would export enums and the relevant Bridging to js and from js code to the spec H files such as:
```
#pragma mark - SampleTurboModuleCxxNumEnum
enum SampleTurboModuleCxxNumEnum { ONE, TWO };
template <>
struct Bridging<SampleTurboModuleCxxNumEnum> {
static SampleTurboModuleCxxNumEnum fromJs(jsi::Runtime &rt, int32_t value) {
if (value == 1) {
return SampleTurboModuleCxxNumEnum::ONE;
} else if (value == 2) {
return SampleTurboModuleCxxNumEnum::TWO;
} else {
throw jsi::JSError(rt, "No appropriate enum member found for value");
}
}
static jsi::Value toJs(jsi::Runtime &rt, SampleTurboModuleCxxNumEnum value) {
if (value == SampleTurboModuleCxxNumEnum::ONE) {
return bridging::toJs(rt, 1);
} else if (value == SampleTurboModuleCxxNumEnum::TWO) {
return bridging::toJs(rt, 2);
} else {
throw jsi::JSError(rt, "No appropriate enum member found for enum value");
}
}
};
```
That code would allow us to use these enums in the cxx files like this:
```
NativeCxxModuleExampleCxxEnumInt getNumEnum(
jsi::Runtime &rt,
NativeCxxModuleExampleCxxEnumInt arg);
```
Changelog: [General] [Added] Generate enum types that would be allowed to be used as well as string/number in c++ turbo modules generators
Reviewed By: christophpurrer
Differential Revision: D42884147
fbshipit-source-id: d34d1fc7ba268b570821dc108444196f69a431b2
Summary:
Add minimum necessary .d.ts files to react-native-codegen.
I found .d.ts files will be copied to `lib` so I guess no additional script is needed.
## Changelog
[GENERAL] [CHANGED] - Add minimum necessary .d.ts files to react-native-codegen
Pull Request resolved: https://github.com/facebook/react-native/pull/36102
Test Plan: `npm run build` in `packages/react-native-codegen` and see all .d.ts files appear in `lib`.
Reviewed By: cortinico
Differential Revision: D43157233
Pulled By: cipolleschi
fbshipit-source-id: 6f122f0f4cda693ba22af6dd534e9d34d069ecac
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36044
> **Notice**: This commit does not change any behaviour.
Parse and collect enum members in module specs instead of the current behaviour of parsing enum members as 'string' / 'number' and ignoring the member names.
This commit would allow us to generate native Enums corresponding to the schema's enums.
Prior to this commit, enum params were parsed as:
```
{
'name': 'qualityParam',
'optional': false,
'typeAnnotation': {
'type': 'EnumDeclaration',
'memberType': 'StringTypeAnnotation'
}
},
```
The name of the enum type and the members of the enum type were ignored.
After this commit, parsed modules would hold a new object member called `enumMap` that would look like this:
```
'enumMap': {
'QualityEnum': {
'name': 'QualityEnum',
'type': 'EnumDeclarationWithMembers',
'memberType': 'StringTypeAnnotation',
'members': [
{
'name': 'SD',
'value': 'sd'
},
{
'name': 'HD',
'value': 'hd'
}
]
},
// ...
}
```
And enum params would be exported as:
```
{
'name': 'qualityParam',
'optional': false,
'typeAnnotation': {
'name': 'NativeModuleEnumTypeAnnotation',
'type': 'EnumDeclaration',
'memberType': 'StringTypeAnnotation'
}
},
```
Combining the two new outputs would allow us to generate Native enums in the Native generators.
Changelog: [Internal] Parse and collect enum members in turbo module specs
Reviewed By: cipolleschi
Differential Revision: D42778258
fbshipit-source-id: 56479342e085bc4e13c5a3e12b265b140e49893c
Summary:
Handling of `EnumDeclaration` was introduced in D38967241 (https://github.com/facebook/react-native/commit/745f3ee8c571560406629bc7af3cf4914ef1b211) so it is no longer a type expected to fail generators.
Changelog: [Internal] remove 'EnumDeclaration' as a type expected to throw error in module generators
Reviewed By: cipolleschi
Differential Revision: D42917947
fbshipit-source-id: 16fcb915ccd42c613ca4d30b815d6365681f5fa1
Summary:
* Added an e2e test fixture with all the supported enum variations
* Added H and C file TM generators to the TM e2e tests
Changelog: [Internal] Added an e2e test fixture for Enums and .H+.C TM e2e snapshot tests
Reviewed By: cipolleschi
Differential Revision: D42917330
fbshipit-source-id: 8e4adb86b6eb4e2b29a9e6d0cd6e4fd5b002ad1a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36042
Pull Request resolved: https://github.com/facebook/react-native/pull/36028
Use aliasMap both in parsers and generators instead of using aliasMap in half of the places and aliases in the other.
This would also allow us to introduce "enumMap" more easily in the next commit.
Changelog: [Internal] rename module exports from "aliases" to "aliasMap"
Reviewed By: christophpurrer, cipolleschi
Differential Revision: D42888752
fbshipit-source-id: cf1929fcebde994d07e5c6bda5ab71106d417b21
Summary:
The [previous pull request](https://github.com/facebook/react-native/pull/35812) enables defining interfaces and using them in a turbo module, but all members are flattened, this is not the best option for codegen for object oriented languages.
In this pull request, an optional member `baseTypes` is added to aliased objects. Members are still flattened for backward compatibility, if a codegen doesn't care about that nothing needs to be changed.
### Example
```typescript
interface A {
a : string;
}
interface B extends A {
b : number;
}
```
#### Before the previous pull request
`interface` is not allowed here, you must use type alias.
#### At the previous pull request
`interface` is allowed, but it is translated to
```typescript
type A = {a : string};
type B = {a : string, b : number};
```
#### At this pull request
Extra information is provided so that you know `B` extends `A`. By comparing `B` to `A` it is easy to know that `B::a` is obtained from `A`.
## Changelog
[GENERAL] [CHANGED] - Turbo module codegen support interface with inheritance in module
Pull Request resolved: https://github.com/facebook/react-native/pull/36011
Test Plan: `yarn jest react-native-codegen` passed
Reviewed By: rshest
Differential Revision: D42882650
Pulled By: cipolleschi
fbshipit-source-id: 32d502e8a99c4151fae0a1f4dfa60db9ac827963
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35982
This reflects better what the former `emitPartial` was doing - emitting an object with set props.
Changelog: [Internal] - Renamed emitPartial to emitObject
Reviewed By: christophpurrer
Differential Revision: D42740958
fbshipit-source-id: 4f974c6911bc129e698323a8039bbd7aa7602461
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35981
This reflects better what the former `emitObject` was doing - emitting a generic object.
It would also allow us to rename `emitPartial` to `emitObject` in the next diff whence the function name `emitObject` will be free.
Changelog: [Internal] - Renamed emitObject to emitGenericObject
Reviewed By: christophpurrer
Differential Revision: D42740871
fbshipit-source-id: 1b9112464695b8abeccc95eed908b0b45a0e3bf2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35984
[Changelog][Internal]
Codegen for props parsing was failing to add a required include for the case when the type is an array of objects, which in turn use non-trivial types.
Something like:
```
export type NativeProps = $ReadOnly<{
...ViewProps,
bounds: $ReadOnlyArray<
$ReadOnly<{
height?: Float,
left?: Float,
top?: Float,
width?: Float,
}>,
>,
}>;
```
would cause compilation errors on C++ side, since the required header for the `Float` conversion wasn't included.
Reviewed By: cipolleschi
Differential Revision: D42781128
fbshipit-source-id: d5b133b931a60e414761db0b3ed09893d3fcc9aa
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35953
DimensionValue is a reserved prop type that can be a number or string (such as '50%'). On Java, it will get converted to a YogaValue (converter added to this diff); on C++ it will get converted to a YGValue (converter already exists as it's used in Fabric).
Changelog:
[Internal][Added] - Add codegen support for DimensionValue for components
Reviewed By: cipolleschi
Differential Revision: D42650799
fbshipit-source-id: 1d2bc30bbd93837dedbbb4c74f814963c8140957
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35961
Pull Request resolved: https://github.com/facebook/react-native/pull/35960
This fixes#35864
This feature allows using `$Partial<Obj>` in flow and `Partial<Obj>` in TypeScript based on the spec mentioned here: https://flow.org/en/docs/types/utilities/#toc-partial.
We currently only allow passing an Obj to Partial so
```
export type SomeObj = {
a: string,
b?: boolean,
};
export type PartialSomeObj = Partial<SomeObj>;
```
should work.
and also-
```
export type PartialSomeObj = Partial<{
a: string,
b?: boolean,
}>;
```
But not
```
export type PartialSomeObj = Partial<Partial<{
a: string,
b?: boolean,
}>>;
```
This can be improved in the future by a recursive unwrapping of the value inside the `Partial` annotation.
Changelog:
[General] [Added] - Allow the use of "Partial<T>" in Turbo Module specs.
Reviewed By: christophpurrer, cipolleschi
Differential Revision: D42640880
fbshipit-source-id: 03a3fccc38ccfc7a5440fe11893beb68e77753f3
Summary:
Changelog:
[Internal][Added] - Add support for props of type Array<EdgeInsetsValue>
Reviewed By: christophpurrer
Differential Revision: D42651078
fbshipit-source-id: 3b8683ab199c3d590136cec0e6a67e9e85aaa2c0