MCPcopy Create free account
hub / github.com/arktypeio/arktype / arrayPathKeyOf

Function arrayPathKeyOf

ark/schema/structure/shared.ts:12–15  ·  view source on GitHub ↗
(k: PropertyKey)

Source from the content-addressed store, hash-verified

10 * elements are, so an index signature's error on one is at the same path
11 */
12export const arrayPathKeyOf = (k: PropertyKey): PropertyKey =>
13 typeof k === "string" && arrayIndexMatcher.test(k) && +k < maxArrayLength ?
14 +k
15 : k

Callers 5

tAllowsMethod · 0.90
tApplyMethod · 0.90
_traverseMethod · 0.90
tTransformMethod · 0.90
applySharedKeysMethod · 0.90

Calls 1

testMethod · 0.80

Tested by

no test coverage detected