-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TS migration] Migrate 'IOUEditRequestReceipt' page to TypeScript #36314
Merged
Merged
Changes from 67 commits
Commits
Show all changes
71 commits
Select commit
Hold shift + click to select a range
91f94c7
Migrate to Typescript
eucool 9a291eb
Put Request types
eucool 5bcb3e3
Update types
eucool eb8dd5f
blank commit for HOC
eucool bbacf1c
fix lint
eucool d632eb8
Add typescript exception for AttachmentPicker
eucool 2ddae0c
Resolve merge conflict
eucool 63e86cb
Migrate to typescript
eucool 7273c5b
Update types
eucool 1725caa
Push deleted file
eucool 8960d8f
Migrate to typescript
eucool 243afc8
revert deleted file
eucool 1bb8fc2
remove conflict
eucool 33363ca
remove conflict
eucool 3c6c657
Merge branch 'main' into issueScan
eucool 4384ed3
Fix lint
eucool cdaec4b
Fix lint
eucool a056120
Fix Route type
eucool c3e70d3
Fix Route type
eucool a97accd
Fix implicit types
eucool 95dc977
remove torch error
eucool 73d8372
Add camera permission module
eucool e782d0d
Apply suggestions from code review
eucool a0a3063
Apply suggestions from code review
eucool 01ae45e
merge conflict resolve
eucool 2f6ebf1
Update index.native.tsx
eucool f9c443a
Merge branch 'main' into issueScan
eucool e0eeabd
Update index.native.tsx
eucool 7259339
Remove merge conflict
eucool 896f75f
Merge branch 'main' into issueScan
eucool 767c945
Merge branch 'Expensify:main' into issueScan
eucool 778f35d
Merge branch 'Expensify:main' into issueScan
eucool 8ccd9cc
migrate to typescript
eucool f2d59d0
Merge branch 'Expensify:main' into issueScan
eucool a5d527a
Migrate to typescript
eucool ef4685a
run prettier
eucool 29eac3d
migrate to typescript
eucool 3a7b4c1
Merge into main
eucool d6209ba
Merge branch 'main' into issueScan
eucool d0abff5
Undo EditRequestReceiptPage
eucool 92e3bb5
Fix pretteir
eucool 9addf33
Merge branch 'Expensify:main' into issueScan
eucool dcab8c7
migrate to typescript
eucool b40f90a
migrate to typescript
eucool b80eeb9
Resolve merge conflict
eucool f072419
Fix type errors after merge conflict
eucool 61588d5
Resolve type errors
eucool 2de7096
Resolve type errors
eucool f85a3a9
Fix nullish operator type error
eucool 331db8f
Fix lint
eucool 7ddf954
Resolve Merge Conflict
eucool ebb1972
Fix camera Issue
eucool 9a8fb99
Fix camera Issue
eucool 9094b82
Fix camera Issue
eucool c54527f
Fix camera Issue
eucool 020e899
Fix camera Issue
eucool 7530ded
Fix camera Issue
eucool 2366548
Fix camera Issue
eucool 59fdb7d
Fix device error
eucool 38895a3
Resolve merge conflict
eucool d2c004a
fix lint
eucool 60cd81b
Merge branch 'Expensify:main' into issueScan
eucool 97ba43e
Merge branch 'Expensify:main' into issueScan
eucool 75a160d
Fix HOC errors
eucool 6eb8473
fix prettier
eucool 08cd715
Merge branch 'main' into issueScan
eucool 852a4c2
Fix onyx report
eucool 35c05cf
Merge branch 'Expensify:main' into issueScan
eucool 0eca33c
Fix on suggestions
eucool a671cfe
Fix not found
eucool 4c53b63
Resolve merge conflicts
eucool File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
src/pages/iou/request/step/IOURequestStepScan/CameraPermission/index.js
This file was deleted.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
src/pages/iou/request/step/IOURequestStepScan/CameraPermission/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import type CameraPermissionModule from './types'; | ||
|
||
const CameraPermission: CameraPermissionModule = { | ||
requestCameraPermission: undefined, | ||
getCameraPermissionStatus: undefined, | ||
}; | ||
|
||
export default CameraPermission; |
6 changes: 6 additions & 0 deletions
6
src/pages/iou/request/step/IOURequestStepScan/CameraPermission/types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
type CameraPermissionModule = { | ||
requestCameraPermission: (() => Promise<string>) | undefined; | ||
getCameraPermissionStatus: (() => Promise<string>) | undefined; | ||
}; | ||
|
||
export default CameraPermissionModule; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/pages/iou/request/step/IOURequestStepScan/NavigationAwareCamera/types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type {CameraProps} from 'react-native-vision-camera'; | ||
import type {WebcamProps} from 'react-webcam'; | ||
|
||
type NavigationAwareCameraProps = WebcamProps & { | ||
/** Flag to turn on/off the torch/flashlight - if available */ | ||
torchOn?: boolean; | ||
|
||
/** The index of the tab that contains this camera */ | ||
onTorchAvailability?: (torchAvailable: boolean) => void; | ||
|
||
/** Callback function when media stream becomes available - user granted camera permissions and camera starts to work */ | ||
cameraTabIndex: number; | ||
}; | ||
|
||
type NavigationAwareCameraNativeProps = CameraProps & { | ||
cameraTabIndex: number; | ||
}; | ||
|
||
export type {NavigationAwareCameraProps, NavigationAwareCameraNativeProps}; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is optional chaining really required for chatReportID?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function must be used in a bunch of places so not to break any functionality here :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I would assume chatReportID is always set. But it's fine