Skip to content

Releases: arktypeio/arktype

@ark/[email protected]

16 Jul 01:29
Compare
Choose a tag to compare
ci: fix publish script

@ark/[email protected]

16 Jul 01:29
Compare
Choose a tag to compare
ci: fix publish script

[email protected]

10 Jul 05:39
60f6bd5
Compare
Choose a tag to compare

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]

10 Jul 13:22
Compare
Choose a tag to compare
chore: bump @arktype/util

@arktype/[email protected]

10 Jul 05:38
60f6bd5
Compare
Choose a tag to compare

Patch Changes

@arktype/[email protected]

09 Jul 20:42
332d5de
Compare
Choose a tag to compare

Patch Changes

@arktype/[email protected]

09 Jul 20:36
01f9b7a
Compare
Choose a tag to compare

Patch Changes

@arktype/[email protected]

09 Jul 02:51
48fb9cb
Compare
Choose a tag to compare

Patch Changes

[email protected]

09 Jul 20:42
332d5de
Compare
Choose a tag to compare
[email protected] Pre-release
Pre-release

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]

09 Jul 02:51
48fb9cb
Compare
Choose a tag to compare
[email protected] Pre-release
Pre-release

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>
}