deslop-js 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,44 @@
1
+ //#region src/types.d.ts
2
+ interface UnusedFile {
3
+ path: string;
4
+ }
5
+ interface UnusedExport {
6
+ path: string;
7
+ name: string;
8
+ line: number;
9
+ column: number;
10
+ isTypeOnly: boolean;
11
+ }
12
+ interface UnusedDependency {
13
+ name: string;
14
+ isDevDependency: boolean;
15
+ }
16
+ interface CircularDependency {
17
+ files: string[];
18
+ }
19
+ interface ScanResult {
20
+ unusedFiles: UnusedFile[];
21
+ unusedExports: UnusedExport[];
22
+ unusedDependencies: UnusedDependency[];
23
+ circularDependencies: CircularDependency[];
24
+ totalFiles: number;
25
+ totalExports: number;
26
+ analysisTimeMs: number;
27
+ }
28
+ interface DeslopConfig {
29
+ rootDir: string;
30
+ entryPatterns: string[];
31
+ ignorePatterns: string[];
32
+ includeExtensions: string[];
33
+ tsConfigPath: string | undefined;
34
+ reportTypes: boolean;
35
+ includeEntryExports: boolean;
36
+ }
37
+ //#endregion
38
+ //#region src/index.d.ts
39
+ declare const defineConfig: (options: Partial<DeslopConfig> & {
40
+ rootDir: string;
41
+ }) => DeslopConfig;
42
+ declare const analyze: (config: DeslopConfig) => Promise<ScanResult>;
43
+ //#endregion
44
+ export { type CircularDependency, type DeslopConfig, type ScanResult, type UnusedDependency, type UnusedExport, type UnusedFile, analyze, defineConfig };
@@ -0,0 +1,44 @@
1
+ //#region src/types.d.ts
2
+ interface UnusedFile {
3
+ path: string;
4
+ }
5
+ interface UnusedExport {
6
+ path: string;
7
+ name: string;
8
+ line: number;
9
+ column: number;
10
+ isTypeOnly: boolean;
11
+ }
12
+ interface UnusedDependency {
13
+ name: string;
14
+ isDevDependency: boolean;
15
+ }
16
+ interface CircularDependency {
17
+ files: string[];
18
+ }
19
+ interface ScanResult {
20
+ unusedFiles: UnusedFile[];
21
+ unusedExports: UnusedExport[];
22
+ unusedDependencies: UnusedDependency[];
23
+ circularDependencies: CircularDependency[];
24
+ totalFiles: number;
25
+ totalExports: number;
26
+ analysisTimeMs: number;
27
+ }
28
+ interface DeslopConfig {
29
+ rootDir: string;
30
+ entryPatterns: string[];
31
+ ignorePatterns: string[];
32
+ includeExtensions: string[];
33
+ tsConfigPath: string | undefined;
34
+ reportTypes: boolean;
35
+ includeEntryExports: boolean;
36
+ }
37
+ //#endregion
38
+ //#region src/index.d.ts
39
+ declare const defineConfig: (options: Partial<DeslopConfig> & {
40
+ rootDir: string;
41
+ }) => DeslopConfig;
42
+ declare const analyze: (config: DeslopConfig) => Promise<ScanResult>;
43
+ //#endregion
44
+ export { type CircularDependency, type DeslopConfig, type ScanResult, type UnusedDependency, type UnusedExport, type UnusedFile, analyze, defineConfig };