fix: missing return
This commit is contained in:
parent
740c597f3c
commit
512d5817f2
@ -19,8 +19,11 @@ export default class SchemaArray<Type extends SchemaItem> extends SchemaItem<Arr
|
|||||||
* split a string into an array
|
* split a string into an array
|
||||||
* @param [separator] default:`,` the separator to use
|
* @param [separator] default:`,` the separator to use
|
||||||
*/
|
*/
|
||||||
|
@parceable()
|
||||||
public split(separator = ',') {
|
public split(separator = ',') {
|
||||||
this.addPreProcess((it) => typeof it === 'string' ? it.split(separator) : it)
|
this.addPreProcess((it) => typeof it === 'string' ? it.split(separator) : it)
|
||||||
|
|
||||||
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
public parse(input: unknown, options?: { fast?: boolean }): ValidationResult<Array<SchemaInfer<Type>>> {
|
public parse(input: unknown, options?: { fast?: boolean }): ValidationResult<Array<SchemaInfer<Type>>> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user