JSPM

@inward/example-context

2.2.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q16077F
  • License MIT

Standalone examples for @inward/context

Package Exports

  • @inward/example-context

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@inward/example-context) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@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

Example Description
binding-types.ts Various ways to provide values for a binding
configuration-injection.ts Configuration for bindings and injection of configurations
context-chain.ts Contexts are chained to create a hierarchy of registries
context-observation.ts Observe context (bind/unbind) and context view (refresh) events
custom-configuration-resolver.ts Override how configuration is resolved from a given binding
custom-inject-decorator.ts How to create a new decorator for custom injections
custom-inject-resolve.ts How to specify a custom resolve function for bindings
dependency-injection.ts Different styles of dependency injection
find-bindings.ts Different flavors of finding bindings in a context
injection-without-binding.ts Perform dependency injection without binding a class
interceptor-proxy.ts Get proxies to intercept method invocations
parameterized-decoration.ts Apply decorators that require parameters as arguments
sync-async.ts Resolve bindings with dependencies synchronously or asynchronously
value-promise.ts Handle 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