[TS migration] Setup typescript in react-native-onyx#452
[TS migration] Setup typescript in react-native-onyx#452rlinoz merged 21 commits intoExpensify:mainfrom
Conversation
|
I am getting some weird behavior like messages not coming through, or not being able to add a new workspace room. Did you have any of those? |
chrispader
left a comment
There was a problem hiding this comment.
LGTM, except for one test failing right now! ✅
|
Just so you know: I have another PR ongoing which reverts two PRs which are also part of the migration here. Not sure which PR to merge first, but in any case we'll have to revert some of these changes later, and maybe re-apply them in the future... |
|
@rlinoz On what platform? Can you record a video or provide more detailed steps? edit: I updated both PRs please pull the newest changes |
|
Working on failing test, it's very weird 🤷♂️ |
There was a problem hiding this comment.
Some minor comments, but in general LTGM! I've tested in all platforms and it's working fine for me.
@blazejkustra What about setting up typecheck and prettier in the lint workflow like we did for Expensify/App here?
|
Tried again today and everything worked fine, probably something weird in my environment yesterday, sorry about that. |
|
@rlinoz I resolved conflicts and adjusted the code after Fabio's review. Can we proceed with a merge? 👀 |
@chrispader I think we can proceed with TS setup first, wdyt? |
Details
Going forward Onyx code will be written in Typescript, we have to take into consideration transpiling step now.
.tscode will live inlibcatalog and transpiled code will end up indistcatalog. The lib catalog won’t be published to npm; instead, we’ll only publish the dist catalog.Here is a slack discussion, where it is explained in details why these changes are necessary.
Related Issues
GH_LINK
Automated Tests
N/A (same as before)
Manual Tests
npm run buildnpm packcommand to generate package code (this generates.tgzfile, unzip it)App/node_modules/react-native-onyx(use this PR/branch)Author Checklist
### Related Issuessection aboveTestssectiontoggleReportand notonIconClick)myBool && <MyComponent />.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)Avataris modified, I verified thatAvataris working as expected in all cases)mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop