very simple injector for Typescript code to simplify and speed up code production

Usage no npm install needed!

<script type="module">
  import teysInjector from 'https://cdn.skypack.dev/teys-injector';



Simple injector syntax for Typescript code. It allows you to set dependency

import { Injectable, Inject } from "teys-injector";

class Service {
    method1(): boolean {
        return false;
import { Inject } from "teys-injector";

class OtherClass {
    svc: Service;
    method2() {
        return this.svc.method1();

You can also register manually values and resolve them

import { Injector } from "teys-injector";

Injector.Register("user", { username: 'default' });
import { Injector } from "teys-injector";

const defaultUser = Injector.Resolve<User>("user");

Not supported yet

  • Injectable constructor parameters