Skip to content

Commit 6c7ed2b

Browse files
authored
fix: terminal warning due to missing type import / exports (#317)
* Add type imports to index file * add type import to Form Screen * Added changeset for form package patch
1 parent 4f04f1d commit 6c7ed2b

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

.changeset/gold-insects-press.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@react-native-ama/forms': patch
3+
---
4+
5+
Fixed babel transform warning on forms type import/exports (@babel/plugin-transform-typescript)

examples/shared/src/screens/Form.screen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Form, FormActions, TextInput } from '@react-native-ama/forms';
1+
import { Form, type FormActions, TextInput } from '@react-native-ama/forms';
22
import { Text } from '@react-native-ama/react-native';
33
import * as React from 'react';
44
import { ScrollView, StyleSheet } from 'react-native';

packages/forms/src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
import { isFocused } from '@react-native-ama/internal';
44

55
import {
6-
FormActions,
6+
type FormActions,
77
Form as FormProvider,
88
type FormProps,
99
} from './components/Form';
10-
import { FormField, FormFieldProps } from './components/FormField';
11-
import { FormSubmit, FormSubmitProps } from './components/FormSubmit';
12-
import { FormSwitch, FormSwitchProps } from './components/FormSwitch';
10+
import { FormField, type FormFieldProps } from './components/FormField';
11+
import { FormSubmit, type FormSubmitProps } from './components/FormSubmit';
12+
import { FormSwitch, type FormSwitchProps } from './components/FormSwitch';
1313

1414
type FormComponent = React.FunctionComponent<FormProps> & {
1515
Submit: (props: FormSubmitProps) => JSX.Element;

0 commit comments

Comments
 (0)