-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Typescript: cannot import Item component - type is imported instead #21
Comments
This component does export export function ChoicesComponent({ itemComponent = Item, items, onSubmit }: Props) {
|
@vadimdemedes you got my intentions wrong. I want to import a component, not a type, and use it as a default parameter. But I can’t, because a type is imported instead. |
Hm, what would be a solution for this? |
To get
|
The issue seems to be that the export in index.ts is exporting the Line 5 in 5440399
I think this should actually be:
|
I think you can solve this via:
|
@guyellis I tried
and have error
|
Ok. I had
and fixed by setting the label as a string
|
index.test-d.tsx exports types and default value (
InkSelectInput
):ink-select-input/index.d.ts
Lines 72 to 75 in 6e0f6f4
However, it doesn't export
Item
andIndicator
components. Because of that, an attempt to importItem
fromink-select-input
ends up with:Error:
Code snippet used:
The text was updated successfully, but these errors were encountered: