explaingit

patrickjs/static-injector

Analysis updated 2026-07-18 · repo last pushed 2022-01-29

Audience · developerComplexity · 3/5DormantSetup · moderate

TLDR

A standalone TypeScript dependency injection system, modeled on Angular's DI, that wires components together at compile time using decorators.

Mindmap

mindmap
  root((repo))
    What it does
      Dependency injection
      Compile-time wiring
      Decorator-based
    Tech stack
      TypeScript
      Decorators
      Custom transformer
    Use cases
      Wire large TS apps
      Reduce boilerplate
      Angular-style DI
    Audience
      TypeScript developers
      Angular-familiar devs
    Build tools
      Webpack
      Rollup
      Plain TypeScript

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Automatically wire dependencies between classes instead of manually passing objects around

USE CASE 2

Reduce boilerplate in a large TypeScript project where many components reference each other

USE CASE 3

Bring Angular-style dependency injection to a non-Angular TypeScript codebase

USE CASE 4

Make code easier to test and refactor by decoupling how components get their dependencies

What is it built with?

TypeScript

How does it compare?

patrickjs/static-injector0verflowme/alarm-clock0verflowme/seclists
LanguageCSS
Last pushed2022-01-292022-10-032020-05-03
MaintenanceDormantDormantDormant
Setup difficultymoderateeasyeasy
Complexity3/52/51/5
Audiencedevelopervibe coderops devops

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 1h+

Requires wiring a custom TypeScript transformer into your build tool (webpack, rollup, etc.).

Copy-paste prompts

Prompt 1
Show me how to mark a class with @Injectable and create an Injector using static-injector.
Prompt 2
Help me set up the custom TypeScript transformer this repo needs with webpack's ts-loader.
Prompt 3
Explain how static-injector's compile-time wiring differs from Angular's runtime dependency injection.
Prompt 4
Walk me through configuring static-injector with Rollup based on this repo's example projects.

Frequently asked questions

What is static-injector?

A standalone TypeScript dependency injection system, modeled on Angular's DI, that wires components together at compile time using decorators.

Is static-injector actively maintained?

Dormant — no commits in 2+ years (last push 2022-01-29).

How hard is static-injector to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is static-injector for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.