@neatcapital/typed-path
v2.0.2
Published
Type safe object string paths for typescript.
Downloads
4
Maintainers
Readme
Typed Path
This is a temporary fork of https://github.com/bsalex/typed-path with fixes for newer typescript versions and other misc improvements. Hopefully this will be merged into bsalex's repo soon.
Problem
Types are lost when string paths are used in typescript.
I.e. _.get, _.map, _.set, R.pluck
from libraries like lodash, ramda.
It makes those methods dangerous in case of refactoring, the same as JavaScript.
Solution
Errors
With typed-path
typescript can check paths and warns you about errors.
Suggestions
Also typed-path
allows typescript to suggest field names for you.
License
Copyright (c) 2017 Oleksandr Beshchuk <[email protected]>
Licensed under the Apache License.