Releases: BoostIO/tachijs
Releases · BoostIO/tachijs
v0.14.1
v0.14.0
v0.13.0
v0.12.0
Features
- Expose internal injector api,
Injector
.
Now you can use DI without tachijs. It is useful for some testing and scripts which don't need to use tachijs server.
import { Injector } from 'tachijs'
// Create injector
const injector = new Injector(container)
// Instantiate by a key
const myService = injector.inject<MyService>(ServiceTypes.MyService)
// Instantiate by a constructor
const myService = injector.instantiate(MyService)
v0.11.0
v0.10.1
v0.10.0
Features
- Introduce
BaseController#context
. To know more, check #22.
interface Context {
req: express.Request
res: express.Response
inject<S>(key: string): S
}
export class BaseController {
context?: Context
...
Due to the introducing, BaseController#inject
, BaseController#injector
and BaseController#httpContext
will be deprecated from v1. For now, it will just show warning messages.