const startsWith = Schema.String.pipe(Schema.startsWith('start:'));
const endsWith = Schema.String.pipe(Schema.endsWith(':end'));
const startStruct = Schema.Struct({
key: startsWith,
});
const endStruct = Schema.Struct({
key: endsWith,
});
/**
* Error: Unsupported schema or overlapping types
* at path: ["key"]
* details: cannot extend string with a string ending with ":end"
*/
const schema = startStruct.pipe(Schema.extend(endStruct));
const decode = Schema.decodeSync(schema);
const actual = decode({ key: 'start:5:end' });
const startsWith = Schema.String.pipe(Schema.startsWith('start:'));
const endsWith = Schema.String.pipe(Schema.endsWith(':end'));
const startStruct = Schema.Struct({
key: startsWith,
});
const endStruct = Schema.Struct({
key: endsWith,
});
/**
* Error: Unsupported schema or overlapping types
* at path: ["key"]
* details: cannot extend string with a string ending with ":end"
*/
const schema = startStruct.pipe(Schema.extend(endStruct));
const decode = Schema.decodeSync(schema);
const actual = decode({ key: 'start:5:end' });