Skip to content

Commit

Permalink
chore(sanity): fix resolveUploader typings
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoerge committed Sep 11, 2023
1 parent 50b7976 commit 5e45e49
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export interface ArrayOfObjectsInputProps<
/**
* @hidden
* @beta */
resolveUploader: UploaderResolver
resolveUploader: UploaderResolver<ObjectSchemaType>

/**
* @hidden
Expand Down

0 comments on commit 5e45e49

Please sign in to comment.