MCPcopy
hub / github.com/sindresorhus/ky / createSchema

Function createSchema

test/main.ts:21–29  ·  view source on GitHub ↗
(
	validate: (value: unknown) => TestSchemaResult<Output> | Promise<TestSchemaResult<Output>>,
)

Source from the content-addressed store, hash-verified

19type TestSchemaResult<Output> = {value: Output} | {issues: Array<{message: string}>};
20
21const 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
31const isObjectWithValue = (value: unknown): value is {value: unknown} => (
32 typeof value === 'object'

Callers 2

createSchemaCallTrackerFunction · 0.85
main.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…