DI-Compiler (The compiler for DI) 
The compiler for DI
Installation
Simply do: npm install @wessberg/di-compiler
.
Usage
import {compile, getIntro} from "@wessberg/di-compiler";
const compiled = compile(
"a_file.ts", `
class Foo implements IFoo {}
DIContainer.registerSingleton<IFoo, Foo>();
`);
const intro = getIntro();
Changelog:
v1.0.11:
- Built-in constructors (for example "Proxy" or anything that is a native part of the environment) can now be added as services too.
v1.0.10:
- The package began depending on 'compiler-common' rather than setting up its own blacklist filter.
v1.0.9:
- Bumped CodeAnalyzer dependency to ^v1.0.18
- Fixed issue where files matching tslib would be parsed.
v1.0.8:
- Bumped CodeAnalyzer dependency to ^v1.0.18
v1.0.7:
- The Compiler will now recursively parse all imports, rather than just one step up.
- The Compiler will now also check exports in case modules are exported from another file.
v1.0.6:
- The Compiler will now parse all imports for classes before proceeding.
- The Compiler will now check if another global constructor arguments map exists and assign to it if it exists instead of overwriting it.
v1.0.5:
- Bumped CodeAnalyzer dependency to ^v1.0.17
- Bumped DI dependency to ^v1.0.16
has
expressions can now be handled.
v1.0.4:
- Bumped CodeAnalyzer dependency to ^v1.0.11
v1.0.3:
- Bumped CodeAnalyzer dependency to ^v1.0.10
v1.0.2:
- Bumped CodeAnalyzer dependency to ^v1.0.9
v1.0.1:
- Fixed an issue where the found class declarations would be reset for each new file.
v1.0.0: