https://github.com/rokkit-ts/rokkit.ts-class-declaration-resolver
A Support Library for the Rokkit.ts Framework based on TypeScript and Node.js
https://github.com/rokkit-ts/rokkit.ts-class-declaration-resolver
backend dependency-injection framework microservice microservices nodejs rokkit typescript
Last synced: about 1 month ago
JSON representation
A Support Library for the Rokkit.ts Framework based on TypeScript and Node.js
- Host: GitHub
- URL: https://github.com/rokkit-ts/rokkit.ts-class-declaration-resolver
- Owner: rokkit-ts
- License: mit
- Created: 2019-09-03T07:21:17.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T18:32:48.000Z (over 3 years ago)
- Last Synced: 2025-12-07T14:34:12.174Z (6 months ago)
- Topics: backend, dependency-injection, framework, microservice, microservices, nodejs, rokkit, typescript
- Language: TypeScript
- Homepage: https://rokkit.dev
- Size: 108 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# rokkit.ts-class-declaration-resolver
[](https://travis-ci.com/rokkit-ts/rokkit.ts-class-declaration-resolver)
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.
## Install and Build
To install the package:
```bash
npm install @rokkit.ts/class-declaration-resolver
```
## Usage
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.
```typescript
import { ClassDeclarationResolver } from "@rokkit.ts/class-declaration-resolver";
ClassDeclarationResolver.createClassDeclarationFile(
"./sample-project",
"./config",
"declarations.json"
);
const declarations = ClassDeclarationResolver.importClassDeclarationFromFile(
"./config/declarations.json"
);
```
### API Description
| Class: | ClassDeclarationResolver |
| :------: | :------------------------------------------------------------------------------------------------------------ |
| Methods: | createClassDeclarations(scanningEntryPointPath: string) |
| | createClassDeclarationFile(scanningEntryPointPath: string, outDirPath: string, fileName: string) |
| | importClassDeclarationFromFile(filePath: string) |
## Contribution
All kinds of contributions are welcome, no matter how big or small.
Before you start to contribute please read our [Code of Conduct](./CODE_OF_CONDUCT.md).
In order to submit any contribution check out our [contribution guidelines](./CONTRIBUTION.md).
## License
Rokkit.ts-dependency-injection is Open Source software released under the MIT License.