react-native icon indicating copy to clipboard operation
react-native copied to clipboard

Add Map / indexed object support for TypeScript parser

Open christophpurrer opened this issue 3 years ago • 3 comments

Summary: Changelog: [General][Fixed] [react-native-codegen] react-native-codegen : Add Map / indexed object support for TypeScript parser

In flow we can expose Maps via the following syntax in TM specs

+getMap: (arg: {[key: string]: ?number}) => {[key: string]: ?number};

In TypeScript writing the same spec:

readonly getMap: (arg: { [key: string]: number | null; }) => { [key: string]: number | null; };

leads to an exception the TypeScript code-gen parser

    at react-native-github/packages/react-native-codegen/src/parsers/typescript/modules/index.js:309:23```

This change fixes the TypeScript parser

Reviewed By: cipolleschi

Differential Revision: D40753368

christophpurrer avatar Oct 27 '22 08:10 christophpurrer

This pull request was exported from Phabricator. Differential Revision: D40753368

facebook-github-bot avatar Oct 27 '22 08:10 facebook-github-bot

This pull request was exported from Phabricator. Differential Revision: D40753368

facebook-github-bot avatar Oct 27 '22 14:10 facebook-github-bot

This pull request was exported from Phabricator. Differential Revision: D40753368

facebook-github-bot avatar Oct 27 '22 16:10 facebook-github-bot

This pull request was exported from Phabricator. Differential Revision: D40753368

facebook-github-bot avatar Oct 28 '22 06:10 facebook-github-bot

This pull request was exported from Phabricator. Differential Revision: D40753368

facebook-github-bot avatar Oct 28 '22 06:10 facebook-github-bot

This pull request was exported from Phabricator. Differential Revision: D40753368

facebook-github-bot avatar Oct 28 '22 12:10 facebook-github-bot

This pull request was exported from Phabricator. Differential Revision: D40753368

facebook-github-bot avatar Oct 28 '22 12:10 facebook-github-bot

This pull request was exported from Phabricator. Differential Revision: D40753368

facebook-github-bot avatar Oct 28 '22 15:10 facebook-github-bot

This pull request was exported from Phabricator. Differential Revision: D40753368

facebook-github-bot avatar Oct 28 '22 16:10 facebook-github-bot

This pull request was exported from Phabricator. Differential Revision: D40753368

facebook-github-bot avatar Oct 29 '22 21:10 facebook-github-bot

This pull request was successfully merged by Christoph Purrer in 87c356d56c73c3289da3d5911288909720b11994.

When will my fix make it into a release? | Upcoming Releases

react-native-bot avatar Oct 30 '22 12:10 react-native-bot