Skip to content

Commit 873b01a

Browse files
authored
V7 - Upgrade typescript to latest version 4.9.5 and fix errors (#2490)
1 parent 2d09979 commit 873b01a

File tree

5 files changed

+5
-6
lines changed

5 files changed

+5
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
"react-test-renderer": "^17.0.1",
118118
"reassure": "^0.4.1",
119119
"shell-utils": "^1.0.10",
120-
"typescript": "4.3.2",
120+
"typescript": "4.9.5",
121121
"postcss": "^8.4.21",
122122
"postcss-js": "^4.0.0"
123123
},

src/components/button/Button.driver.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class ButtonDriver extends ComponentDriver {
1717
}
1818

1919
isPressable = async () => {
20-
if (this.exists()) {
20+
if (await this.exists()) {
2121
return typeof (await this.getElementProps()).onPress === 'function';
2222
} else {
2323
console.warn(`TextDriver: cannot click because testID:${this.testID} were not found`);

src/components/hint/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ class Hint extends Component<HintProps, HintState> {
538538

539539
return (
540540
<View style={[styles.mockChildrenContainer, layout]}>
541-
{React.cloneElement(children, {
541+
{React.cloneElement<any>(children, {
542542
collapsable: false,
543543
key: 'mock',
544544
style: [children.props.style, styles.mockChildren]
@@ -552,7 +552,7 @@ class Hint extends Component<HintProps, HintState> {
552552
const {targetFrame} = this.props;
553553

554554
if (!targetFrame && isValidElement(this.props.children)) {
555-
return React.cloneElement(this.props.children, {
555+
return React.cloneElement<any>(this.props.children, {
556556
key: 'clone',
557557
collapsable: false,
558558
onLayout: this.onTargetLayout,

src/components/text/Text.driver.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export class TextDriver extends ComponentDriver {
1111
}
1212

1313
isPressable = async () => {
14-
if (this.exists()) {
14+
if (await this.exists()) {
1515
return typeof (await this.getElementProps()).onPress === 'function';
1616
} else {
1717
console.warn(`TextDriver: cannot click because testID:${this.testID} were not found`);

src/incubator/toast/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ const Toast = (props: PropsWithChildren<ToastProps>) => {
5757
const playAccessibilityFeatures = () => {
5858
if (visible) {
5959
if (viewRef.current && action) {
60-
// @ts-expect-error
6160
const reactTag = findNodeHandle(viewRef.current);
6261
AccessibilityInfo.setAccessibilityFocus(reactTag!);
6362
} else if (message) {

0 commit comments

Comments
 (0)