@neatcapital/typed-path
TypeScript icon, indicating that this package has built-in type declarations

2.0.2 • Public • Published

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 <bs.alex.mail@gmail.com>
Licensed under the Apache License.

Package Sidebar

Install

npm i @neatcapital/typed-path

Weekly Downloads

1

Version

2.0.2

License

Apache-2.0

Unpacked Size

6.95 kB

Total Files

7

Last publish

Collaborators

  • steveherschleb