Open fnimick opened 2 hours ago
string, keywords, string.lower, string.trim, case
OS: macOS 15.0 CPU: (10) arm64 Apple M1 Pro Memory: 92.36 MB / 16.00 GB Shell: 5.9 - /bin/zsh
Binaries: Node: 20.13.1 - ~/.asdf/installs/nodejs/20.13.1/bin/node Yarn: 1.22.19 - ~/.yarn/bin/yarn npm: 10.5.2 - ~/.asdf/plugins/nodejs/shims/npm pnpm: 9.7.0 - ~/.asdf/shims/pnpm npmPackages: arktype: ^2.0.0-rc.12 => 2.0.0-rc.12 typescript: ^5.5.4 => 5.5.4
type('string.lower').to('string.trim').to("'success'")('Success') type('string.lower').to('string.trim').to("'success'")('success ') type('string.trim').to('string.lower').to("'success'")('Success') type('string.trim').to('string.lower').to("'success'")('success ')
It appears that the intermediate type does not take effect.
It also seems to happen with pipe:
type('string.trim').pipe(type('string.lower'), type('string'))('Foo ')
I expect this to return 'foo', but it errors instead.
'foo'
Report a bug
🔎 Search Terms
string, keywords, string.lower, string.trim, case
🧩 Context
Binaries: Node: 20.13.1 - ~/.asdf/installs/nodejs/20.13.1/bin/node Yarn: 1.22.19 - ~/.yarn/bin/yarn npm: 10.5.2 - ~/.asdf/plugins/nodejs/shims/npm pnpm: 9.7.0 - ~/.asdf/shims/pnpm npmPackages: arktype: ^2.0.0-rc.12 => 2.0.0-rc.12 typescript: ^5.5.4 => 5.5.4
🧑💻 Repro
It appears that the intermediate type does not take effect.