Rokkit.ts Class declaration resolver is used to create class information that are not present on runtime. It is mainly used by the rokkit.ts-dependency-injection package.
To install the package:
npm install @rokkit.ts/class-declaration-resolver
The package is designed to retrieve class information about a user project/folder. The information contain data about the file, the classes and the constructor parameters of this class. The following example shows how to scan a project export and re-import the class information.
import { ClassDeclarationResolver } from "@rokkit.ts/class-declaration-resolver";
ClassDeclarationResolver.createClassDeclarationFile(
"./sample-project",
"./config",
"declarations.json"
);
const declarations = ClassDeclarationResolver.importClassDeclarationFromFile(
"./config/declarations.json"
);
Class: | ClassDeclarationResolver |
---|---|
Methods: | createClassDeclarations(scanningEntryPointPath: string) |
createClassDeclarationFile(scanningEntryPointPath: string, outDirPath: string, fileName: string) |
|
importClassDeclarationFromFile(filePath: string) |
All kinds of contributions are welcome, no matter how big or small. Before you start to contribute please read our Code of Conduct.
In order to submit any contribution check out our contribution guidelines.
Rokkit.ts-dependency-injection is Open Source software released under the MIT License.