Hey Craig, when I use Interface, it is not working on Array.Number
Interface
Array.Number
// This is not working setData(person, 'cars.1.brand', 'BYD-YUAN')
here is the code
Looking forward to Ur help
Thx to @nroboto . Finally I've solved type-safe array dot notation.
here is the code-intelligence
See here
Update for derivation of array types type SubArrayPath
= P extends PropertyKey ? ${number} : ${number} | ${number}.${PathTemp<P>}
${number}
${number}.${PathTemp<P>}
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hey Craig, when I use
Interface
, it is not working onArray.Number
here is the code
Looking forward to Ur help
Thx to @nroboto . Finally I've solved type-safe array dot notation.
here is the code-intelligence
See here
Update for derivation of array types
type SubArrayPath
= P extends PropertyKey ?
${number}
:${number}
|${number}.${PathTemp<P>}