Skip to content

Commit

Permalink
Merge pull request #26175 from software-mansion-labs/ts-migration/con…
Browse files Browse the repository at this point in the history
…vertToLTR2

[TS migration] Migrate 'convertToLTR' lib to TypeScript
  • Loading branch information
MariaHCD authored Aug 31, 2023
2 parents dd71b38 + e174580 commit 648d20d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import ConvertToLTR from './types';

/**
* Android only - convert RTL text to a LTR text using Unicode controls.
* https://www.w3.org/International/questions/qa-bidi-unicode-controls
* @param {String} text
* @returns {String}
*/
export default function convertToLTR(text) {
return `\u2066${text}`;
}
const convertToLTR: ConvertToLTR = (text) => `\u2066${text}`;

export default convertToLTR;
3 changes: 0 additions & 3 deletions src/libs/convertToLTR/index.js

This file was deleted.

5 changes: 5 additions & 0 deletions src/libs/convertToLTR/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import ConvertToLTR from './types';

const convertToLTR: ConvertToLTR = (text) => text;

export default convertToLTR;
3 changes: 3 additions & 0 deletions src/libs/convertToLTR/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
type ConvertToLTR = (text: string) => string;

export default ConvertToLTR;

0 comments on commit 648d20d

Please sign in to comment.