Service factory to integrate typescript-rest with typescript-ioc for dependency injection in REST services. Current stable version: 1.0.1. It enables IoC features like @Inject, request scopes, and DI in typescript-rest routes. This package acts as a bridge; you must install typescript-rest and typescript-ioc separately. Differentiator: seamless integration with typescript-ioc's container, allowing constructor injection and scoped services. Maintenance mode: last release was in 2020, no recent updates.
npm install typescript-rest-iocNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to configure typescript-rest-ioc via rest.config.json and use @Inject from typescript-ioc in a REST service.
Consider alternatives like inversify or tsyringe with manual integration.
Set serviceFactory in rest.config.json to 'typescript-rest-ioc'.
Run npm install typescript-rest typescript-ioc typescript-rest-ioc.
Use `private helloService!: HelloService;` to avoid TS2564 error.
npm install typescript-rest-ioc --save
Create rest.config.json with {"serviceFactory": "typescript-rest-ioc"}Add ! after property name: @Inject private helloService!: HelloService;