@hamelin.sh/compiler 0.1.17-prerelease.20250424T134127 → 0.1.18

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.
package/dist/main.d.ts CHANGED
@@ -1,3 +1,7 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ type CompileResult = { Ok: Translation } | { Err: ContextualTranslationErrors };
4
+
1
5
  type StatementDatasetsResult = { Ok: string[] } | { Err: ContextualTranslationErrors };
2
6
 
3
7
  interface FunctionDescription {
@@ -7,17 +11,19 @@ interface FunctionDescription {
7
11
 
8
12
  interface ContextualTranslationErrors {
9
13
  hamelin: string;
10
- errors: TranslationErrors;
11
- pretty: string;
14
+ errors: ContextualTranslationError[];
12
15
  }
13
16
 
14
- type TranslationErrors = TranslationError[];
15
-
16
17
  interface Context {
17
18
  interval: { start: number; end: number } | undefined;
18
19
  message: string;
19
20
  }
20
21
 
22
+ interface ContextualTranslationError {
23
+ error: TranslationError;
24
+ pretty: string;
25
+ }
26
+
21
27
  interface TranslationError {
22
28
  area: LanguageArea | undefined;
23
29
  stage: Stage;
@@ -47,14 +53,7 @@ interface Translation {
47
53
  columns: Column[];
48
54
  }
49
55
 
50
- type AugmentedCompileResult = {
51
- Ok: Translation;
52
- } | {
53
- Err: ContextualTranslationErrors & {
54
- prettyRaw: string;
55
- };
56
- };
57
- declare const compileHamelin: (catalog: Catalog, hamelinInput: string, timeRange?: string) => Promise<AugmentedCompileResult>;
56
+ declare const compileHamelin: (catalog: Catalog, hamelinInput: string, timeRange?: string) => Promise<CompileResult>;
58
57
 
59
58
  declare const getFunctionDescriptions: () => Promise<FunctionDescription[]>;
60
59
 
@@ -62,4 +61,4 @@ declare const getDatasetsFromQuery: (catalog: Catalog, hamelinInput: string) =>
62
61
 
63
62
  declare const sampleCatalog: Catalog;
64
63
 
65
- export { type AugmentedCompileResult, type Catalog, type FunctionDescription, compileHamelin, getDatasetsFromQuery, getFunctionDescriptions, sampleCatalog };
64
+ export { type Catalog, type FunctionDescription, compileHamelin, getDatasetsFromQuery, getFunctionDescriptions, sampleCatalog };