Skip to content

Commit

Permalink
chore(sanity): fix resolveUploader typings (#4916)
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoerge committed Sep 13, 2023
1 parent 67696cb commit 112a46a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Expand Up @@ -7,11 +7,12 @@ import {FileLike, ResolvedUploader, UploaderResolver} from '../../../../studio/u
import {FileInfo, fileTarget} from '../../../common/fileTarget'
import {DropMessage} from '../../../files/common/DropMessage'
import {UploadEvent} from '../../../../types'
import {FIXME} from '../../../../../FIXME'
import {Overlay} from './styles'

export interface UploadTargetProps {
types: SchemaType[]
resolveUploader?: UploaderResolver
resolveUploader?: UploaderResolver<FIXME>
onUpload?: (event: UploadEvent) => void
children?: React.ReactNode
}
Expand Down Expand Up @@ -39,7 +40,7 @@ function getUploadCandidates(
.filter((member) => member.uploader) as ResolvedUploader[]
}
export function uploadTarget<Props>(Component: React.ComponentType<Props>) {
const FileTarget = fileTarget<any>(Component)
const FileTarget = fileTarget<FIXME>(Component)

return React.forwardRef(function UploadTarget(
props: UploadTargetProps & Props,
Expand Down
2 changes: 1 addition & 1 deletion packages/sanity/src/core/form/types/inputProps.ts
Expand Up @@ -199,7 +199,7 @@ export interface ArrayOfObjectsInputProps<
/**
* @hidden
* @beta */
resolveUploader: UploaderResolver
resolveUploader: UploaderResolver<ObjectSchemaType>

/**
* @hidden
Expand Down

2 comments on commit 112a46a

@vercel
Copy link

@vercel vercel bot commented on 112a46a Sep 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

performance-studio – ./

performance-studio-git-next.sanity.build
performance-studio.sanity.build

@vercel
Copy link

@vercel vercel bot commented on 112a46a Sep 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

test-studio – ./

test-studio.sanity.build
test-studio-git-next.sanity.build

Please sign in to comment.