You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Be forward-compatible as much as possible. This project is compatible with TC39 decorators as a priority. New features will not be accepted without equivalent functionality for TC39 decorators.
Older standards such as TypeScript's experimental decorators will be supported as well as possible.
Handle asynchronous loading and initialisation gracefully. All requests to a container are asynchronous by default, allowing for the container to handle any logic needed to handle asynchronous bindings or factories.
Type safety as a feature. All API's should be type safe; injections and requests shouldn't be able to return a value that isn't the type requested. Shenanigans with the as keyword should be the only way to break this guarantee.
Explicit non-goals
These are things that explicitly are not something this project is aiming to achieve.
Be a drop-in replacement for any other IOC frameworks. This would especially conflict with goal 1 as the TC39 decorators support a different feature set compared to some of the older standards.
Support reflect-metadata and TypeScripts emitDecoratorMetadata option. It's not a small dependency, interacts poorly with TC39 decorators and generally has a soft conflict with the goal of type safety as it allows inference of things that would be best handled explicitly.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Project goals
as
keyword should be the only way to break this guarantee.Explicit non-goals
These are things that explicitly are not something this project is aiming to achieve.
reflect-metadata
and TypeScriptsemitDecoratorMetadata
option. It's not a small dependency, interacts poorly with TC39 decorators and generally has a soft conflict with the goal of type safety as it allows inference of things that would be best handled explicitly.Beta Was this translation helpful? Give feedback.
All reactions