Pipe required before narrow

const myFunc = (v: string) => true;
const MyString = type("50<string<200").narrow((s) => myFunc(s));

Results in error:
error TS2345: Argument of type 'is<MoreThanLength<50> & LessThanLength<200>>' is not assignable to parameter of type 'string'.

However, adding pipe before calling narrow works:
const myFunc = (v: string) => true;
const MyString = type("50<string<200").pipe((s) => s).narrow((s) => myFunc(s));

Is this intentional?
Was this page helpful?