Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

toPath: Make path steps type more formal #148

Closed
nlepage opened this issue Nov 29, 2017 · 0 comments
Closed

toPath: Make path steps type more formal #148

nlepage opened this issue Nov 29, 2017 · 0 comments
Assignees
Milestone

Comments

@nlepage
Copy link
Member

nlepage commented Nov 29, 2017

Description

toPath() returns results in the following form :
['foo', 1, [1, 3]]

Determining the type of a path step relies on type assertion.

I think it would be better to have a more formal type for path steps :
[[prop, 'foo'], [index, 1], [slice, 1, 3]]

prop, index and slice being symbols exported by path namespace (see #147).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants