
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
  
ttdi is a dependency injection tool for TypeScript and JavaScript.
features:
ttdi leverage decorator and metadata, you need to enable emitting decorator metadata in your Typescript config.Add these two lines to your tsconfig.json file under the compilerOptions key:
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
For the decorator of TypeScript, please refer to decorators
yarn add ttdi -S
or
npm i ttdi -S
import { Inject, Injectable } from 'ttdi'
@Injectable()
export class Bar {
constructor() {
}
}
@Injectable()
export class Baz {
}
@Injectable()
export class Foo {
@Inject
baz!: Baz
constructor(public bar: Bar) {}
}
import { configure, Container } from 'ttdi'
import { Bar, Baz, Foo } from './declare'
const container = new Container()
await configure(container, __dirname + '/declare.ts')
const foo = container.get(Foo)
expect(foo).toBeInstanceOf(Foo)
expect(foo.bar).toBeInstanceOf(Bar)
expect(foo.baz).toBeInstanceOf(Baz)
The tag class can be injected as a provider.
class property inject.
notice: constructor argument will auto injected.
a async providers(injectable) loader.
instance storage container, you can create multi DI containers.
FAQs
  
The npm package ttdi receives a total of 5 weekly downloads. As such, ttdi popularity was classified as not popular.
We found that ttdi demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.