This library allows you to create a statically typed object accessor based on the . The main purpose of this package is to allow dynamic object access in a static manner, without having to rely on dynamic, string based keys. Code won't compile if you try to access a path that does not exist. You keep control over what is returned from the getter, by providing a custom access handler.
yarn add @corets/accessor
npm install --save @corets/accessor
createAccessor()
Create an accessor instance of the type ObjectAccessor.
You can provide a custom access handler to customise the access behaviour. Below is an example of how one could statically access translations, proxied by a translation library, using the accessor.