@alint-js/core 0.1.3 → 0.1.5

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.
@@ -1,86 +0,0 @@
1
- //#region src/core/source/types.d.ts
2
- type ClassTarget = SourceTargetOfKind<'class'>;
3
- type FileTarget = SourceTargetOfKind<'file'>;
4
- type FunctionTarget = SourceTargetOfKind<'function'>;
5
- interface LanguageContext {
6
- cwd: string;
7
- languageOptions: Record<string, unknown>;
8
- src: SourceRuntime;
9
- }
10
- interface LineRange {
11
- endLine: number;
12
- startLine: number;
13
- }
14
- interface ProcessedSource {
15
- identity: string;
16
- language?: string;
17
- origin?: ProcessedSourceOrigin;
18
- path: string;
19
- text: string;
20
- }
21
- interface ProcessedSourceOrigin {
22
- physicalPath: string;
23
- range?: SourceRange;
24
- virtualPath?: string;
25
- }
26
- interface ProcessorContext {
27
- cwd: string;
28
- options: Record<string, unknown>;
29
- src: SourceRuntime;
30
- }
31
- interface ProcessorPostprocessContext extends ProcessorContext {
32
- file: SourceFile;
33
- processedSources: ProcessedSource[];
34
- }
35
- interface SourceFile {
36
- language: string;
37
- lines: string[];
38
- path: string;
39
- text: string;
40
- }
41
- interface SourceLocation {
42
- end: SourcePosition;
43
- start: SourcePosition;
44
- }
45
- interface SourcePosition {
46
- column: number;
47
- line: number;
48
- }
49
- interface SourceRange {
50
- end: number;
51
- start: number;
52
- }
53
- interface SourceRuntime {
54
- getText: (target: SourceFile | SourceTarget) => string;
55
- readFile: (filePath: string) => Promise<SourceFile>;
56
- sliceLines: (file: SourceFile, range: LineRange) => SourceText;
57
- sliceRange: (file: SourceFile, range: SourceRange) => SourceText;
58
- }
59
- interface SourceTarget {
60
- file: SourceFile;
61
- identity: string;
62
- kind: SourceTargetKind;
63
- language: string;
64
- loc?: SourceLocation;
65
- metadata?: Record<string, unknown>;
66
- name?: string;
67
- origin?: SourceTargetOrigin;
68
- range?: SourceRange;
69
- text: string;
70
- }
71
- type SourceTargetKind = 'class' | 'file' | 'fragment' | 'function' | 'symbol' | (string & {});
72
- type SourceTargetOfKind<Kind extends SourceTargetKind> = Omit<SourceTarget, 'kind'> & {
73
- kind: Kind;
74
- };
75
- interface SourceTargetOrigin {
76
- physicalPath: string;
77
- range?: SourceRange;
78
- virtualPath?: string;
79
- }
80
- interface SourceText {
81
- filePath: string;
82
- loc: SourceLocation;
83
- text: string;
84
- }
85
- //#endregion
86
- export { SourceTargetOfKind as _, LineRange as a, ProcessorContext as c, SourceLocation as d, SourcePosition as f, SourceTargetKind as g, SourceTarget as h, LanguageContext as i, ProcessorPostprocessContext as l, SourceRuntime as m, FileTarget as n, ProcessedSource as o, SourceRange as p, FunctionTarget as r, ProcessedSourceOrigin as s, ClassTarget as t, SourceFile as u, SourceTargetOrigin as v, SourceText as y };