Skip to content

Commit 9fec1af

Browse files
Merge pull request #3 from olasunkanmi-SE/development
Add comprehensive README with project overview and usage examples
2 parents 4b36abd + d5e3eb8 commit 9fec1af

File tree

5 files changed

+34
-6
lines changed

5 files changed

+34
-6
lines changed

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# TypeScript Code Extractor and Analyzer
2+
3+
This project provides a robust toolkit for extracting, analyzing, and mapping TypeScript code structures.
4+
5+
The TypeScript Code Extractor and Analyzer is a comprehensive solution designed to parse and analyze TypeScript codebases. It offers a set of tools to extract detailed information about classes, interfaces, functions, and other TypeScript constructs, enabling developers to gain deep insights into their codebase structure and dependencies.
6+
7+
Key features include:
8+
9+
- Extraction of class metadata, including methods, properties, interfaces, and enums
10+
- Function and method analysis, including parameter extraction and return type inference
11+
- Interface and enum information extraction
12+
- Dependency graph generation for TypeScript files
13+
14+
### Code Analysis
15+
16+
To analyze a TypeScript codebase:
17+
18+
```typescript
19+
import { TypeScriptCodeMapper } from "./src/services/typescript-code-mapper.service";
20+
21+
const codeMapper = new TypeScriptCodeMapper();
22+
23+
// Build a codebase map
24+
const codebaseMap = await codeMapper.buildCodebaseMap();
25+
26+
// Extract class metadata
27+
const classInfo = codeMapper.extractClassMetaData(classNode, sourceFile);
28+
29+
// Build a dependency graph
30+
const dependencies = codeMapper.buildDependencyGraph(sourceFile);
31+
```

src/core/constants.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
export const MEMORY_CACHE_OPTIONS = {
2-
serviceName: "SharedKernel",
3-
accountName: "UserSession",
4-
sessionTTL: 24 * 60 * 60 * 1000,
5-
};
6-
71
export enum RequestHeader {
82
AUTHORIZATION = "authorization",
93
CONTENT_TYPE = "Content-Type",

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ export * from "./result";
77
export * from "./interfaces";
88
export * from "./utils";
99
export * from "./core";
10+
export * from "./services";
1011

1112
getCodeBase();

src/interfaces/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
export * from "./generic.interface";
2+
export * from "./ts.code.mapper.interface";

src/services/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./typescript-code-mapper.service";

0 commit comments

Comments
 (0)