Releases: arktypeio/arktype
Releases · arktypeio/arktype
@ark/[email protected]
ci: fix publish script
@ark/[email protected]
ci: fix publish script
[email protected]
Fix parsing for expressions starting with subalias references
In recent versions, types like the following would fail to parse:
// ParseError: "parse.date | Date" is unresolvable
const dateFrom = type("parse.date | Date")
Those expressions are once again resolved correctly.
@arktype/[email protected]
chore: bump @arktype/util
@arktype/[email protected]
Patch Changes
- #1044
450f96b
Thanks @ssalbdivad! - Bump version
@arktype/[email protected]
Patch Changes
64bb34c
Thanks @ssalbdivad! - Bump version
@arktype/[email protected]
Patch Changes
- #1041
040d655
Thanks @ssalbdivad! - Bump version
@arktype/[email protected]
Patch Changes
- #1038
16ae134
Thanks @ssalbdivad! - Bump version
[email protected]
Fix inference for constrained or morphed optional keys (#1040)
const repro = type({
normal: "string>0",
"optional?": "string>0"
})
type Expected = { normal: string; optional?: string }
// these are both now identical to Expected
// (previously, optional was inferred as string.moreThanLength<0>)
type Actual = typeof repro.infer
type ActualIn = typeof repro.infer
[email protected]
Fixed an issue causing morphs on optional keys to give a type error incorrectly indicating they had default values, e.g.:
const t = type({
// previously had a type error here
"optionalKey?": ["string", "=>", x => x.toLowerCase()]
})
// now correctly inferred as
type T = {
optionalKey?: (In: string) => Out<string>
}