Skip to content

Convert unannotated variable declaration with cast init to annotated variable declaration in xplat/js#42880

Closed
gkz wants to merge 1 commit into
facebook:mainfrom
gkz:export-D53392999
Closed

Convert unannotated variable declaration with cast init to annotated variable declaration in xplat/js#42880
gkz wants to merge 1 commit into
facebook:mainfrom
gkz:export-D53392999

Conversation

@gkz
Copy link
Copy Markdown
Member

@gkz gkz commented Feb 6, 2024

Summary:
Convert const x = (a: T) into const x: T = a. These are equivalent in Flow, and helps reduce the amount of colon-casts.

js1 flow-runner codemod flow/castToAnnotatedVariable --target colon xplat/js

Changelog: [Internal]

drop-conflicts

Differential Revision: D53392999

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 6, 2024
@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

…variable declaration in xplat/js (facebook#42880)

Summary:

Convert `const x = (a: T)` into `const x: T = a`. These are equivalent in Flow, and helps reduce the amount of colon-casts.

```
js1 flow-runner codemod flow/castToAnnotatedVariable --target colon xplat/js
```

Changelog: [Internal]


drop-conflicts

Differential Revision: D53392999
@gkz gkz force-pushed the export-D53392999 branch from 39fbc35 to 56b5831 Compare February 6, 2024 03:14
@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

facebook-github-bot pushed a commit to facebook/metro that referenced this pull request Feb 6, 2024
…variable declaration in xplat/js

Summary:
X-link: facebook/react-native#42880

Convert `const x = (a: T)` into `const x: T = a`. These are equivalent in Flow, and helps reduce the amount of colon-casts.

```
js1 flow-runner codemod flow/castToAnnotatedVariable --target colon xplat/js
```

Changelog: [Internal]

drop-conflicts

Reviewed By: SamChou19815

Differential Revision: D53392999

fbshipit-source-id: 3b4602618d6990e8642b423edaeb4e89b01a199a
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in 608029a.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants