TS Error while linking to custom components from structure #3911
Answered
by
wrux
tstikvoort
asked this question in
Sanity Studio Support
-
Hi, I am migrating to Sanity V3 and am really happy with the typescript support. S.listItem()
.title('Import collection')
.child(S.view.component(ImportCollectionView).id('ImportCollection').title('Import collection')) It works as expected to me, by I do get the following typescript error:
How can I fix this? |
Beta Was this translation helpful? Give feedback.
Answered by
wrux
Dec 1, 2022
Replies: 2 comments 2 replies
-
Have you tried just passing the component to
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Looks like you are close, how about this: S.listItem()
.title('Import collection')
.child(S.component(ImportCollectionView).id('ImportCollection').title('Import collection')), |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
tstikvoort
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks like you are close, how about this: