Skip to content

rawCheck accepts a function that returns a Promise #832

Open
@EltonLobo07

Description

The code block shown below should generate a type error as rawCheck might not be designed to use async functions.

import * as v from 'valibot';

const Schema = v.pipe(
  v.object({key: v.string()}),
  // This should generate a type error
  // as the function returns a `Promise`
  v.rawCheck(async () => {})
);

Metadata

Assignees

Labels

questionFurther information is requested

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions