2.2.0 • Published 4 years ago

@inward/example-context v2.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

@inward/example-context

This project contains a list of standalone examples to illustrate Inversion of Control (IoC) and Dependency Injection (DI) capabilities provided by @inward/context.

Examples

ExampleDescription
binding-types.tsVarious ways to provide values for a binding
configuration-injection.tsConfiguration for bindings and injection of configurations
context-chain.tsContexts are chained to create a hierarchy of registries
context-observation.tsObserve context (bind/unbind) and context view (refresh) events
custom-configuration-resolver.tsOverride how configuration is resolved from a given binding
custom-inject-decorator.tsHow to create a new decorator for custom injections
custom-inject-resolve.tsHow to specify a custom resolve function for bindings
dependency-injection.tsDifferent styles of dependency injection
find-bindings.tsDifferent flavors of finding bindings in a context
injection-without-binding.tsPerform dependency injection without binding a class
interceptor-proxy.tsGet proxies to intercept method invocations
parameterized-decoration.tsApply decorators that require parameters as arguments
sync-async.tsResolve bindings with dependencies synchronously or asynchronously
value-promise.tsHandle synchronous or asynchronous results (ValueOrPromise)

Use

Start all examples:

npm start

To run individual examples:

npm run build
node dist/<an-example>

Contributions

Tests

Run npm test from the root folder.

Contributors

See all contributors.

License

MIT