( validate: (value: unknown) => TestSchemaResult<Output> | Promise<TestSchemaResult<Output>>, )
| 19 | type TestSchemaResult<Output> = {value: Output} | {issues: Array<{message: string}>}; |
| 20 | |
| 21 | const createSchema = <Output>( |
| 22 | validate: (value: unknown) => TestSchemaResult<Output> | Promise<TestSchemaResult<Output>>, |
| 23 | ): StandardSchemaV1<unknown, Output> => ({ |
| 24 | '~standard': { |
| 25 | version: 1, |
| 26 | vendor: 'test', |
| 27 | validate, |
| 28 | }, |
| 29 | }); |
| 30 | |
| 31 | const isObjectWithValue = (value: unknown): value is {value: unknown} => ( |
| 32 | typeof value === 'object' |
no outgoing calls
no test coverage detected
searching dependent graphs…