@intersystems-community/ascot 0.3.1 → 0.4.1

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.
@@ -41,6 +41,9 @@ export interface RelationshipInfo {
41
41
  t?: string,
42
42
  cardinality?: Cardinality,
43
43
  }
44
+ export interface IndexInfo {
45
+ properties: Array<string>,
46
+ }
44
47
  /**
45
48
  * # Variants
46
49
  *
@@ -93,6 +96,7 @@ export interface MemberKindForeignKey {
93
96
  }
94
97
  export interface MemberKindIndex {
95
98
  tag: 'index',
99
+ val: IndexInfo,
96
100
  }
97
101
  export interface MemberKindProjection {
98
102
  tag: 'projection',
@@ -136,6 +140,8 @@ export interface ClassInfo {
136
140
  doc: string,
137
141
  name: NameInfo,
138
142
  'extends': Array<string>,
143
+ inheritanceRight: boolean,
144
+ storage?: string,
139
145
  deprecated: boolean,
140
146
  members: Array<MemberInfo>,
141
147
  propertyClassNames: Array<string>,
@@ -143,7 +149,19 @@ export interface ClassInfo {
143
149
  isDatatype?: boolean,
144
150
  uri?: string,
145
151
  }
146
- export interface RoutineSource {
152
+ export interface LabelInfo {
153
+ name: string,
154
+ normal: Array<NormalArg>,
155
+ variadic?: VariadicArg,
156
+ t?: string,
157
+ procedureBlock?: Array<string>,
158
+ declaredAt?: Range,
159
+ }
160
+ export interface RoutineInfo {
161
+ labels?: Array<LabelInfo>,
162
+ uri?: string,
163
+ }
164
+ export interface Source {
147
165
  text: string,
148
166
  uri?: string,
149
167
  }
@@ -9,10 +9,10 @@ export type Location = import('./iris-ascot-common.js').Location;
9
9
  export type DocumentSymbol = import('./iris-ascot-common.js').DocumentSymbol;
10
10
  export type WorkspaceSymbol = import('./iris-ascot-common.js').WorkspaceSymbol;
11
11
  export type Style = import('./iris-ascot-common.js').Style;
12
- export type IrisConnection = import('./iris-ascot-imported.js').IrisConnection;
12
+ export type Env = import('./iris-ascot-imported.js').Env;
13
13
 
14
14
  export class Workspace {
15
- constructor(env: IrisConnection | undefined, style: Style | undefined)
15
+ constructor(env: Env | undefined, style: Style | undefined)
16
16
  open(uri: string, text: string): Array<string>;
17
17
  close(uri: string): Array<string>;
18
18
  diagnostics(uri: string): Promise<Array<Diagnostic>>;
@@ -1,14 +1,32 @@
1
1
  /** @module Interface iris:ascot/imported **/
2
2
  export type ClassInfo = import('./iris-ascot-common.js').ClassInfo;
3
- export type RoutineSource = import('./iris-ascot-common.js').RoutineSource;
4
- export type Option<T> = { tag: 'none' } | { tag: 'some', val: T };
3
+ export type RoutineInfo = import('./iris-ascot-common.js').RoutineInfo;
4
+ export type Source = import('./iris-ascot-common.js').Source;
5
+ export type Env = EnvContext | EnvAtelier;
6
+ export interface EnvContext {
7
+ tag: 'context',
8
+ val: IrisContext,
9
+ }
10
+ export interface EnvAtelier {
11
+ tag: 'atelier',
12
+ val: Atelier,
13
+ }
14
+
15
+ export class Atelier {
16
+ /**
17
+ * This type does not have a public constructor.
18
+ */
19
+ private constructor();
20
+ query(sql: string, params: Array<string>): Promise<string>;
21
+ getDoc(name: string): Promise<string | undefined>;
22
+ }
5
23
 
6
- export class IrisConnection {
24
+ export class IrisContext {
7
25
  /**
8
26
  * This type does not have a public constructor.
9
27
  */
10
28
  private constructor();
11
- getCls(cls: string): Promise<ClassInfo | undefined>;
12
- getInc(name: string): Promise<RoutineSource | undefined>;
13
- getIntOrMac(name: string): Promise<Option<RoutineSource | undefined>>;
29
+ getCls(name: string): Promise<ClassInfo | undefined>;
30
+ getRtn(name: string): Promise<RoutineInfo | undefined>;
31
+ getInc(name: string): Promise<Source | undefined>;
14
32
  }
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intersystems-community/ascot",
3
- "version": "0.3.1",
3
+ "version": "0.4.1",
4
4
  "description": "ascot, a type checker and code intelligence engine for InterSystems ObjectScript, for Node and other JS consumers.",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "keywords": [
@@ -29,6 +29,7 @@
29
29
  },
30
30
  "scripts": {
31
31
  "build": "bash scripts/build.sh",
32
+ "test": "node --test",
32
33
  "format": "prettier --write .",
33
34
  "format:check": "prettier --check ."
34
35
  },