success<T>(context: ParseContext, value: T): ParseResult<T>
context: ParseContext
value: T
import * as x from 'unhoax'const customSchema: x.Schema<string> = { name: 'myType', parse: (input, context = createParseContext('myType', input)) => { if (typeof input === 'string') return x.success(context, input) else return x.failure(context, 'myType', input) }} Copy
import * as x from 'unhoax'const customSchema: x.Schema<string> = { name: 'myType', parse: (input, context = createParseContext('myType', input)) => { if (typeof input === 'string') return x.success(context, input) else return x.failure(context, 'myType', input) }}
See
Example