Skip to content

Commit

Permalink
Narrow the getInputProps helper function return type annotation's `…
Browse files Browse the repository at this point in the history
…type` prop
  • Loading branch information
AMEH64 committed Apr 13, 2024
1 parent d0a22b6 commit 0ee70cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/conform-react/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,10 @@ export function getFormControlProps<Schema>(
* <input {...getInputProps(metadata, { type: 'radio', value: false })} />
* ```
*/
export function getInputProps<Schema>(
export function getInputProps<Schema, Options extends InputOptions>(
metadata: FieldMetadata<Schema, any, any>,
options: InputOptions,
): InputProps {
options: Options,
): InputProps & Pick<Options, 'type'> {
const props: InputProps = {
...getFormControlProps(metadata, options),
type: options.type,
Expand Down

0 comments on commit 0ee70cd

Please sign in to comment.