-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30160 from software-mansion-labs/ts-migration/get…
…-permitted-decimal-separator [TS migration] Migrate 'getPermittedDecimalSeparator' lib to TypeScript
- Loading branch information
Showing
5 changed files
with
24 additions
and
14 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,7 @@ | ||
// On iOS keyboard can only have one symbol at a time (either dot or comma) so we accept both | ||
// Details: https://expensify.slack.com/archives/C01GTK53T8Q/p1658936908481629 | ||
import GetPermittedDecimalSeparator from './types'; | ||
|
||
const getPermittedDecimalSeparator: GetPermittedDecimalSeparator = () => '.,'; | ||
|
||
export default getPermittedDecimalSeparator; |
This file was deleted.
Oops, something went wrong.
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,14 @@ | ||
import getOperatingSystem from '@libs/getOperatingSystem'; | ||
import CONST from '@src/CONST'; | ||
import getPermittedDecimalSeparatorIOS from './index.ios'; | ||
import GetPermittedDecimalSeparator from './types'; | ||
|
||
const getPermittedDecimalSeparator: GetPermittedDecimalSeparator = (localizedSeparator) => { | ||
if (getOperatingSystem() === CONST.OS.IOS) { | ||
return getPermittedDecimalSeparatorIOS(localizedSeparator); | ||
} | ||
|
||
return localizedSeparator; | ||
}; | ||
|
||
export default getPermittedDecimalSeparator; |
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,3 @@ | ||
type GetPermittedDecimalSeparator = (localizedSeparator: string) => string; | ||
|
||
export default GetPermittedDecimalSeparator; |