@zenstackhq/language 3.5.6 → 3.6.0
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/ast-Clidp86c.cjs +1465 -0
- package/dist/ast-Clidp86c.cjs.map +1 -0
- package/dist/ast-DEfhnj8j.mjs +765 -0
- package/dist/ast-DEfhnj8j.mjs.map +1 -0
- package/dist/ast-DQDdBZQ3.d.mts +525 -0
- package/dist/ast-W2h6Qtfk.d.cts +525 -0
- package/dist/ast.cjs +130 -1432
- package/dist/ast.cjs.map +1 -1
- package/dist/ast.d.cts +2 -541
- package/dist/ast.d.mts +2 -0
- package/dist/ast.mjs +20 -0
- package/dist/ast.mjs.map +1 -0
- package/dist/factory.cjs +754 -2030
- package/dist/factory.cjs.map +1 -1
- package/dist/factory.d.cts +220 -215
- package/dist/factory.d.mts +289 -0
- package/dist/factory.mjs +778 -0
- package/dist/factory.mjs.map +1 -0
- package/dist/index.cjs +2691 -5454
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +104 -103
- package/dist/index.d.mts +170 -0
- package/dist/index.mjs +6925 -0
- package/dist/index.mjs.map +1 -0
- package/dist/utils-BB6L7ug2.mjs +529 -0
- package/dist/utils-BB6L7ug2.mjs.map +1 -0
- package/dist/utils-CfXGZkv7.cjs +842 -0
- package/dist/utils-CfXGZkv7.cjs.map +1 -0
- package/dist/utils.cjs +47 -1650
- package/dist/utils.d.cts +101 -10
- package/dist/{utils.d.ts → utils.d.mts} +101 -10
- package/dist/utils.mjs +2 -0
- package/package.json +16 -15
- package/dist/ast.d.ts +0 -541
- package/dist/ast.js +0 -1288
- package/dist/ast.js.map +0 -1
- package/dist/factory.d.ts +0 -284
- package/dist/factory.js +0 -2020
- package/dist/factory.js.map +0 -1
- package/dist/index.d.ts +0 -169
- package/dist/index.js +0 -9656
- package/dist/index.js.map +0 -1
- package/dist/utils.cjs.map +0 -1
- package/dist/utils.js +0 -1572
- package/dist/utils.js.map +0 -1
package/dist/factory.d.cts
CHANGED
|
@@ -1,284 +1,289 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { $ as ReferenceArg, A as Enum, B as InvocationExpr, D as DataModel, E as DataFieldType, F as FunctionDecl, G as ModelImport, H as MemberAccessExpr, J as ObjectExpr, K as NullExpr, M as Expression, O as DataModelAttribute, P as FieldInitializer, T as DataFieldAttribute, U as MemberAccessTarget, V as LiteralExpr, W as Model, _ as BuiltinType, at as ThisExpr, c as Argument, ct as UnaryExpr, d as AttributeArg, et as ReferenceExpr, f as AttributeParam, g as BooleanLiteral, i as Reference$1, it as StringLiteral, j as EnumField, l as ArrayExpr, lt as UnsupportedFieldType, m as BinaryExpr, nt as RegularID, ot as TypeDeclaration, p as AttributeParamType, q as NumberLiteral, rt as RegularIDWithTypeNames, s as AbstractDeclaration, st as TypeDef, t as AstNode$1, tt as ReferenceTarget, u as Attribute, w as DataField, z as InternalAttribute } from "./ast-W2h6Qtfk.cjs";
|
|
2
|
+
import { Reference } from "langium";
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
//#region src/factory/ast-factory.d.ts
|
|
5
|
+
type ContainerProps<T extends AstNode$1 | undefined> = {
|
|
6
|
+
$container: T;
|
|
7
|
+
$containerProperty?: string;
|
|
8
|
+
$containerIndex?: number;
|
|
8
9
|
};
|
|
9
|
-
type NodeFactoriesFor<N> = {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
update(nodeArg: Partial<T | NodeFactoriesFor<T>>): T;
|
|
10
|
+
type NodeFactoriesFor<N> = { [K in keyof N as {} extends Pick<N, K> ? never : K]: N[K] extends (infer U)[] ? (AstFactory<U extends AstNode$1 ? U : AstNode$1> | U)[] : AstFactory<N[K] extends AstNode$1 ? N[K] : AstNode$1> | N[K] } & { [K in keyof N as {} extends Pick<N, K> ? K : never]?: N[K] extends (infer U)[] ? (AstFactory<U extends AstNode$1 ? U : AstNode$1> | U)[] : AstFactory<N[K] extends AstNode$1 ? N[K] : AstNode$1> | N[K] };
|
|
11
|
+
declare abstract class AstFactory<T extends AstNode$1 = AstNode$1> {
|
|
12
|
+
node: T;
|
|
13
|
+
constructor({
|
|
14
|
+
type,
|
|
15
|
+
node
|
|
16
|
+
}: {
|
|
17
|
+
type: T['$type'];
|
|
18
|
+
node?: Partial<T>;
|
|
19
|
+
});
|
|
20
|
+
setContainer(container: T['$container']): this;
|
|
21
|
+
get(params?: ContainerProps<T['$container']>): T;
|
|
22
|
+
update(nodeArg: Partial<T | NodeFactoriesFor<T>>): T;
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/factory/primitives.d.ts
|
|
25
26
|
declare class ThisExprFactory extends AstFactory<ThisExpr> {
|
|
26
|
-
|
|
27
|
+
constructor();
|
|
27
28
|
}
|
|
28
29
|
declare class NullExprFactory extends AstFactory<NullExpr> {
|
|
29
|
-
|
|
30
|
+
constructor();
|
|
30
31
|
}
|
|
31
32
|
declare class NumberLiteralFactory extends AstFactory<NumberLiteral> {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
value?: number | string;
|
|
34
|
+
constructor();
|
|
35
|
+
setValue(value: number | string): this;
|
|
35
36
|
}
|
|
36
37
|
declare class StringLiteralFactory extends AstFactory<StringLiteral> {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
value?: string;
|
|
39
|
+
constructor();
|
|
40
|
+
setValue(value: string): this;
|
|
40
41
|
}
|
|
41
42
|
declare class BooleanLiteralFactory extends AstFactory<BooleanLiteral> {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
value?: boolean;
|
|
44
|
+
constructor();
|
|
45
|
+
setValue(value: boolean): this;
|
|
45
46
|
}
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region src/factory/expression.d.ts
|
|
48
49
|
declare const ExpressionBuilder: () => {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
50
|
+
readonly ArrayExpr: ArrayExprFactory;
|
|
51
|
+
readonly BinaryExpr: BinaryExprFactory;
|
|
52
|
+
readonly BooleanLiteral: BooleanLiteralFactory;
|
|
53
|
+
readonly InvocationExpr: InvocationExprFactory;
|
|
54
|
+
readonly MemberAccessExpr: MemberAccessExprFactory;
|
|
55
|
+
readonly NullExpr: NullExprFactory;
|
|
56
|
+
readonly NumberLiteral: NumberLiteralFactory;
|
|
57
|
+
readonly ObjectExpr: ObjectExprFactory;
|
|
58
|
+
readonly ReferenceExpr: ReferenceExprFactory;
|
|
59
|
+
readonly StringLiteral: StringLiteralFactory;
|
|
60
|
+
readonly ThisExpr: ThisExprFactory;
|
|
61
|
+
readonly UnaryExpr: UnaryExprFactory;
|
|
61
62
|
};
|
|
63
|
+
type ExpressionFactoryMap = ReturnType<typeof ExpressionBuilder>;
|
|
62
64
|
type ExpressionBuilder<T extends Expression = Expression> = Pick<ExpressionFactoryMap, Extract<T['$type'], keyof ExpressionFactoryMap>>;
|
|
63
65
|
declare class UnaryExprFactory extends AstFactory<UnaryExpr> {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
operand?: AstFactory<Expression>;
|
|
67
|
+
constructor();
|
|
68
|
+
setOperand(builder: (a: ExpressionBuilder) => AstFactory<Expression>): this;
|
|
67
69
|
}
|
|
68
70
|
declare class ReferenceExprFactory extends AstFactory<ReferenceExpr> {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
target?: Reference<ReferenceTarget>;
|
|
72
|
+
args: ReferenceArgFactory[];
|
|
73
|
+
constructor();
|
|
74
|
+
setTarget(target: ReferenceTarget): this;
|
|
75
|
+
addArg(builder: (a: ExpressionBuilder) => AstFactory<Expression>, name?: string): this;
|
|
74
76
|
}
|
|
75
77
|
declare class ReferenceArgFactory extends AstFactory<ReferenceArg> {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
name?: string;
|
|
79
|
+
value?: AstFactory<Expression>;
|
|
80
|
+
constructor();
|
|
81
|
+
setName(name: string): this;
|
|
82
|
+
setValue(builder: (a: ExpressionBuilder) => AstFactory<Expression>): this;
|
|
81
83
|
}
|
|
82
84
|
declare class MemberAccessExprFactory extends AstFactory<MemberAccessExpr> {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
member?: Reference<MemberAccessTarget>;
|
|
86
|
+
operand?: AstFactory<Expression>;
|
|
87
|
+
constructor();
|
|
88
|
+
setMember(target: Reference<MemberAccessTarget>): this;
|
|
89
|
+
setOperand(builder: (b: ExpressionBuilder) => AstFactory<Expression>): this;
|
|
88
90
|
}
|
|
89
91
|
declare class ObjectExprFactory extends AstFactory<ObjectExpr> {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
92
|
+
fields: FieldInitializerFactory[];
|
|
93
|
+
constructor();
|
|
94
|
+
addField(builder: (b: FieldInitializerFactory) => FieldInitializerFactory): this;
|
|
93
95
|
}
|
|
94
96
|
declare class FieldInitializerFactory extends AstFactory<FieldInitializer> {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
name?: RegularID;
|
|
98
|
+
value?: AstFactory<Expression>;
|
|
99
|
+
constructor();
|
|
100
|
+
setName(name: RegularID): this;
|
|
101
|
+
setValue(builder: (a: ExpressionBuilder) => AstFactory<Expression>): this;
|
|
100
102
|
}
|
|
101
103
|
declare class InvocationExprFactory extends AstFactory<InvocationExpr> {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
args: ArgumentFactory[];
|
|
105
|
+
function?: Reference<FunctionDecl>;
|
|
106
|
+
constructor();
|
|
107
|
+
addArg(builder: (arg: ArgumentFactory) => ArgumentFactory): this;
|
|
108
|
+
setFunction(value: FunctionDecl): this;
|
|
107
109
|
}
|
|
108
110
|
declare class ArgumentFactory extends AstFactory<Argument> {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
111
|
+
value?: AstFactory<Expression>;
|
|
112
|
+
constructor();
|
|
113
|
+
setValue(builder: (a: ExpressionBuilder) => AstFactory<Expression>): this;
|
|
112
114
|
}
|
|
113
115
|
declare class ArrayExprFactory extends AstFactory<ArrayExpr> {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
116
|
+
items: AstFactory<Expression>[];
|
|
117
|
+
constructor();
|
|
118
|
+
addItem(builder: (a: ExpressionBuilder) => AstFactory<Expression>): this;
|
|
117
119
|
}
|
|
118
120
|
declare class BinaryExprFactory extends AstFactory<BinaryExpr> {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
121
|
+
operator?: BinaryExpr['operator'];
|
|
122
|
+
right?: AstFactory<Expression>;
|
|
123
|
+
left?: AstFactory<Expression>;
|
|
124
|
+
constructor();
|
|
125
|
+
setOperator(operator: BinaryExpr['operator']): this;
|
|
126
|
+
setRight(builder: (arg: ExpressionBuilder) => AstFactory<Expression>): this;
|
|
127
|
+
setLeft(builder: (arg: ExpressionBuilder) => AstFactory<Expression>): this;
|
|
126
128
|
}
|
|
127
|
-
|
|
129
|
+
//#endregion
|
|
130
|
+
//#region src/factory/attribute.d.ts
|
|
128
131
|
declare class DataFieldAttributeFactory extends AstFactory<DataFieldAttribute> {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
args: AttributeArgFactory[];
|
|
133
|
+
decl?: Reference$1<Attribute>;
|
|
134
|
+
constructor();
|
|
135
|
+
setDecl(decl: Attribute): this;
|
|
136
|
+
addArg(builder: (b: ExpressionBuilder) => AstFactory<Expression>, name?: string): this;
|
|
134
137
|
}
|
|
135
138
|
declare class DataModelAttributeFactory extends AstFactory<DataModelAttribute> {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
139
|
+
args: AttributeArgFactory[];
|
|
140
|
+
decl?: Reference$1<Attribute>;
|
|
141
|
+
constructor();
|
|
142
|
+
setDecl(decl: Attribute): this;
|
|
143
|
+
addArg(builder: (b: ExpressionBuilder) => AstFactory<Expression>, name?: string): this;
|
|
141
144
|
}
|
|
142
145
|
declare class AttributeArgFactory extends AstFactory<AttributeArg> {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
name?: RegularID;
|
|
147
|
+
value?: AstFactory<Expression>;
|
|
148
|
+
constructor();
|
|
149
|
+
setName(name: RegularID): this;
|
|
150
|
+
setValue(builder: (b: ExpressionBuilder) => AstFactory<Expression>): this;
|
|
148
151
|
}
|
|
149
152
|
declare class InternalAttributeFactory extends AstFactory<InternalAttribute> {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
153
|
+
decl?: Reference$1<Attribute>;
|
|
154
|
+
args: AttributeArgFactory[];
|
|
155
|
+
constructor();
|
|
156
|
+
setDecl(decl: Attribute): this;
|
|
157
|
+
addArg(builder: (b: ExpressionBuilder) => AstFactory<Expression>, name?: string): this;
|
|
155
158
|
}
|
|
156
159
|
declare class AttributeParamFactory extends AstFactory<AttributeParam> {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
160
|
+
attributes: InternalAttributeFactory[];
|
|
161
|
+
comments: string[];
|
|
162
|
+
default?: boolean;
|
|
163
|
+
name?: RegularID;
|
|
164
|
+
type?: AttributeParamTypeFactory;
|
|
165
|
+
constructor();
|
|
166
|
+
addAttribute(builder: (b: InternalAttributeFactory) => InternalAttributeFactory): this;
|
|
167
|
+
setComments(comments: string[]): this;
|
|
168
|
+
setDefault(defaultValue: boolean): this;
|
|
169
|
+
setName(name: string): this;
|
|
170
|
+
setType(builder: (b: AttributeParamTypeFactory) => AttributeParamTypeFactory): this;
|
|
168
171
|
}
|
|
169
172
|
declare class AttributeParamTypeFactory extends AstFactory<AttributeParamType> {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
173
|
+
array?: boolean;
|
|
174
|
+
optional?: boolean;
|
|
175
|
+
reference?: Reference$1<TypeDeclaration>;
|
|
176
|
+
type?: AttributeParamType['type'];
|
|
177
|
+
constructor();
|
|
178
|
+
setArray(array: boolean): this;
|
|
179
|
+
setOptional(optional: boolean): this;
|
|
180
|
+
setReference(reference: TypeDeclaration): this;
|
|
181
|
+
setType(type: AttributeParamType['type']): this;
|
|
179
182
|
}
|
|
180
183
|
declare class AttributeFactory extends AstFactory<Attribute> {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
184
|
+
name?: string;
|
|
185
|
+
comments: string[];
|
|
186
|
+
attributes: InternalAttributeFactory[];
|
|
187
|
+
params: AttributeParamFactory[];
|
|
188
|
+
constructor();
|
|
189
|
+
setName(name: string): this;
|
|
190
|
+
setComments(comments: string[]): this;
|
|
191
|
+
addAttribute(builder: (b: InternalAttributeFactory) => InternalAttributeFactory): this;
|
|
192
|
+
addParam(builder: (b: AttributeParamFactory) => AttributeParamFactory): this;
|
|
190
193
|
}
|
|
191
|
-
|
|
192
|
-
|
|
194
|
+
//#endregion
|
|
195
|
+
//#region src/factory/declaration.d.ts
|
|
193
196
|
declare const DeclarationBuilder: () => {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
197
|
+
readonly Attribute: AttributeFactory;
|
|
198
|
+
readonly DataModel: DataModelFactory;
|
|
199
|
+
readonly DataSource: any;
|
|
200
|
+
readonly Enum: EnumFactory;
|
|
201
|
+
readonly FunctionDecl: any;
|
|
202
|
+
readonly GeneratorDecl: any;
|
|
203
|
+
readonly Plugin: any;
|
|
204
|
+
readonly Procedure: any;
|
|
205
|
+
readonly TypeDef: any;
|
|
203
206
|
};
|
|
207
|
+
type DeclarationBuilderMap = ReturnType<typeof DeclarationBuilder>;
|
|
204
208
|
type DeclarationBuilder<T extends AbstractDeclaration = AbstractDeclaration> = Pick<DeclarationBuilderMap, Extract<T['$type'], keyof DeclarationBuilderMap>>;
|
|
205
209
|
declare class DataModelFactory extends AstFactory<DataModel> {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
210
|
+
attributes: DataModelAttributeFactory[];
|
|
211
|
+
baseModel?: Reference$1<DataModel>;
|
|
212
|
+
comments: string[];
|
|
213
|
+
fields: DataFieldFactory[];
|
|
214
|
+
isView?: boolean;
|
|
215
|
+
mixins: Reference$1<TypeDef>[];
|
|
216
|
+
name?: RegularID;
|
|
217
|
+
constructor();
|
|
218
|
+
addAttribute(builder: (attr: DataModelAttributeFactory) => DataModelAttributeFactory): this;
|
|
219
|
+
setBaseModel(model: Reference$1<DataModel>): this;
|
|
220
|
+
setComments(comments: string[]): this;
|
|
221
|
+
addComment(comment: string): this;
|
|
222
|
+
addField(builder: (field: DataFieldFactory) => DataFieldFactory): this;
|
|
223
|
+
setIsView(isView: boolean): this;
|
|
224
|
+
addMixin(mixin: Reference$1<TypeDef>): this;
|
|
225
|
+
setName(name: string): this;
|
|
222
226
|
}
|
|
223
227
|
declare class DataFieldFactory extends AstFactory<DataField> {
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
228
|
+
attributes: DataFieldAttributeFactory[];
|
|
229
|
+
comments: string[];
|
|
230
|
+
name?: string;
|
|
231
|
+
type?: DataFieldTypeFactory;
|
|
232
|
+
constructor();
|
|
233
|
+
addAttribute(builder: ((attr: DataFieldAttributeFactory) => DataFieldAttributeFactory) | DataFieldAttributeFactory): this;
|
|
234
|
+
setComments(comments: string[]): this;
|
|
235
|
+
setName(name: string): this;
|
|
236
|
+
setType(builder: (type: DataFieldTypeFactory) => DataFieldTypeFactory): this;
|
|
233
237
|
}
|
|
234
238
|
declare class DataFieldTypeFactory extends AstFactory<DataFieldType> {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
239
|
+
array?: boolean;
|
|
240
|
+
optional?: boolean;
|
|
241
|
+
reference?: Reference$1<TypeDeclaration>;
|
|
242
|
+
type?: BuiltinType;
|
|
243
|
+
unsupported?: UnsupportedFieldTypeFactory;
|
|
244
|
+
constructor();
|
|
245
|
+
setArray(array: boolean): this;
|
|
246
|
+
setOptional(optional: boolean): this;
|
|
247
|
+
setReference(reference: TypeDeclaration): this;
|
|
248
|
+
setType(type: BuiltinType): this;
|
|
249
|
+
setUnsupported(builder: (a: UnsupportedFieldTypeFactory) => UnsupportedFieldTypeFactory): this;
|
|
246
250
|
}
|
|
247
251
|
declare class UnsupportedFieldTypeFactory extends AstFactory<UnsupportedFieldType> {
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
252
|
+
value?: AstFactory<LiteralExpr>;
|
|
253
|
+
constructor();
|
|
254
|
+
setValue(builder: (value: ExpressionBuilder<LiteralExpr>) => AstFactory<LiteralExpr>): this;
|
|
251
255
|
}
|
|
252
256
|
declare class ModelFactory extends AstFactory<Model> {
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
257
|
+
declarations: AstFactory<AbstractDeclaration>[];
|
|
258
|
+
imports: ModelImportFactory[];
|
|
259
|
+
constructor();
|
|
260
|
+
addImport(builder: (b: ModelImportFactory) => ModelImportFactory): this;
|
|
261
|
+
addDeclaration(builder: (b: DeclarationBuilder) => AstFactory<AbstractDeclaration>): this;
|
|
258
262
|
}
|
|
259
263
|
declare class ModelImportFactory extends AstFactory<ModelImport> {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
264
|
+
path?: string | undefined;
|
|
265
|
+
constructor();
|
|
266
|
+
setPath(path: string): this;
|
|
263
267
|
}
|
|
264
268
|
declare class EnumFactory extends AstFactory<Enum> {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
269
|
+
name?: string;
|
|
270
|
+
comments: string[];
|
|
271
|
+
fields: EnumFieldFactory[];
|
|
272
|
+
attributes: DataModelAttributeFactory[];
|
|
273
|
+
constructor();
|
|
274
|
+
addField(builder: (b: EnumFieldFactory) => EnumFieldFactory): this;
|
|
275
|
+
addAttribute(builder: (b: DataModelAttributeFactory) => DataModelAttributeFactory): this;
|
|
276
|
+
setName(name: string): this;
|
|
273
277
|
}
|
|
274
278
|
declare class EnumFieldFactory extends AstFactory<EnumField> {
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
279
|
+
name?: RegularIDWithTypeNames;
|
|
280
|
+
comments: string[];
|
|
281
|
+
attributes: DataFieldAttributeFactory[];
|
|
282
|
+
constructor();
|
|
283
|
+
setName(name: RegularIDWithTypeNames): this;
|
|
284
|
+
addAttribute(builder: (b: DataFieldAttributeFactory) => DataFieldAttributeFactory): this;
|
|
285
|
+
addComment(comment: string): this;
|
|
282
286
|
}
|
|
283
|
-
|
|
284
|
-
export { ArgumentFactory, ArrayExprFactory, AstFactory, AttributeArgFactory, AttributeFactory, AttributeParamFactory, AttributeParamTypeFactory, BinaryExprFactory, BooleanLiteralFactory,
|
|
287
|
+
//#endregion
|
|
288
|
+
export { ArgumentFactory, ArrayExprFactory, AstFactory, AttributeArgFactory, AttributeFactory, AttributeParamFactory, AttributeParamTypeFactory, BinaryExprFactory, BooleanLiteralFactory, ContainerProps, DataFieldAttributeFactory, DataFieldFactory, DataFieldTypeFactory, DataModelAttributeFactory, DataModelFactory, DeclarationBuilder, EnumFactory, EnumFieldFactory, ExpressionBuilder, FieldInitializerFactory, InternalAttributeFactory, InvocationExprFactory, MemberAccessExprFactory, ModelFactory, ModelImportFactory, NullExprFactory, NumberLiteralFactory, ObjectExprFactory, ReferenceArgFactory, ReferenceExprFactory, StringLiteralFactory, ThisExprFactory, UnaryExprFactory, UnsupportedFieldTypeFactory };
|
|
289
|
+
//# sourceMappingURL=factory.d.cts.map
|