{"id":18609854,"url":"https://github.com/unlight/inject-compile-time","last_synced_at":"2025-08-18T05:49:06.937Z","repository":{"id":138160643,"uuid":"437372108","full_name":"unlight/inject-compile-time","owner":"unlight","description":"Play with Custom Transformer for Typescript that enables compile-time Dependency Injection","archived":false,"fork":false,"pushed_at":"2021-12-14T17:23:37.000Z","size":177,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-07T05:31:50.220Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unlight.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-11T19:35:04.000Z","updated_at":"2021-12-14T17:23:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"9e5ef20c-c7d2-4c3c-9c57-1202911bd783","html_url":"https://github.com/unlight/inject-compile-time","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/unlight/inject-compile-time","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unlight%2Finject-compile-time","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unlight%2Finject-compile-time/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unlight%2Finject-compile-time/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unlight%2Finject-compile-time/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unlight","download_url":"https://codeload.github.com/unlight/inject-compile-time/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unlight%2Finject-compile-time/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270951278,"owners_count":24674006,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T03:07:29.114Z","updated_at":"2025-08-18T05:49:06.895Z","avatar_url":"https://github.com/unlight.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Peers\n- https://github.com/YePpHa/ts-di-transformer\n- https://github.com/wessberg/DI\n\n## https://github.com/YePpHa/ts-di-transformer\n\n```sh\nnpx webpack \u0026\u0026 node dist/main.js\n```\n\n```ts\nclass App {\n    constructor(todo) {\n        this._todo = todo;\n    }\n}\n\nbootstrap.resolve(app_1.App, [Symbol.for(\"ITodoService#0978228a\")]);\n```\n\n### Pros/cons\n[-] Do not enable `transpileOnly` - will not work  \n[+] Maybe better for NestJS  \n```ts\n@Module({\n  imports: [],\n  controllers: [AppController],\n  providers: [\n    {\n      provide: InterfaceSymbol\u003cITodoService\u003e(),\n      useClass: TodoService,\n    },\n  ],\n})\nexport class AppController {\n  constructor(@Inject(InterfaceSymbol\u003cITodoService\u003e()) private readonly todoService: ITodoService) { }\n}\n```\n\n## https://github.com/wessberg/di-compiler\n```sh\nnpx webpack \u0026\u0026 node dist/bundle.js\n```\n\n```ts\nclass App {\n    constructor(todo) {\n        this._todo = todo;\n    }\n    static get [Symbol.for(\"___CTOR_ARGS___\")]() { return [`ITodoService`]; }\n}\n```\n\n## Resouces\n- https://github.com/TypeStrong/ts-node#third-party-compilers\n- https://github.com/nonara/ts-patch#configuring","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funlight%2Finject-compile-time","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funlight%2Finject-compile-time","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funlight%2Finject-compile-time/lists"}