Skip to content

Version 1.1.12#1555

Merged
sinclairzx81 merged 3 commits into
mainfrom
length
Mar 31, 2026
Merged

Version 1.1.12#1555
sinclairzx81 merged 3 commits into
mainfrom
length

Conversation

@sinclairzx81
Copy link
Copy Markdown
Owner

This PR adds an intrinsic length property on Tuple and Array to enable conditional logic to be derived from schema.items.length. The property is provided on Tuple and Array types only as the items length would otherwise be inaccessible to Script.

const A = Type.Script(`[1, 2, 3, 4, 5]['length']`) // TLiteral<5>

const B = Type.Script(`number[]['length']`)        // TNumber

@sinclairzx81 sinclairzx81 merged commit c9ad6ba into main Mar 31, 2026
6 checks passed
@sinclairzx81 sinclairzx81 deleted the length branch March 31, 2026 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant