1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.TSAnyKeyword = TSAnyKeyword;
|
7 | exports.TSArrayType = TSArrayType;
|
8 | exports.TSSatisfiesExpression = exports.TSAsExpression = TSTypeExpression;
|
9 | exports.TSBigIntKeyword = TSBigIntKeyword;
|
10 | exports.TSBooleanKeyword = TSBooleanKeyword;
|
11 | exports.TSCallSignatureDeclaration = TSCallSignatureDeclaration;
|
12 | exports.TSConditionalType = TSConditionalType;
|
13 | exports.TSConstructSignatureDeclaration = TSConstructSignatureDeclaration;
|
14 | exports.TSConstructorType = TSConstructorType;
|
15 | exports.TSDeclareFunction = TSDeclareFunction;
|
16 | exports.TSDeclareMethod = TSDeclareMethod;
|
17 | exports.TSEnumDeclaration = TSEnumDeclaration;
|
18 | exports.TSEnumMember = TSEnumMember;
|
19 | exports.TSExportAssignment = TSExportAssignment;
|
20 | exports.TSExpressionWithTypeArguments = TSExpressionWithTypeArguments;
|
21 | exports.TSExternalModuleReference = TSExternalModuleReference;
|
22 | exports.TSFunctionType = TSFunctionType;
|
23 | exports.TSImportEqualsDeclaration = TSImportEqualsDeclaration;
|
24 | exports.TSImportType = TSImportType;
|
25 | exports.TSIndexSignature = TSIndexSignature;
|
26 | exports.TSIndexedAccessType = TSIndexedAccessType;
|
27 | exports.TSInferType = TSInferType;
|
28 | exports.TSInstantiationExpression = TSInstantiationExpression;
|
29 | exports.TSInterfaceBody = TSInterfaceBody;
|
30 | exports.TSInterfaceDeclaration = TSInterfaceDeclaration;
|
31 | exports.TSIntersectionType = TSIntersectionType;
|
32 | exports.TSIntrinsicKeyword = TSIntrinsicKeyword;
|
33 | exports.TSLiteralType = TSLiteralType;
|
34 | exports.TSMappedType = TSMappedType;
|
35 | exports.TSMethodSignature = TSMethodSignature;
|
36 | exports.TSModuleBlock = TSModuleBlock;
|
37 | exports.TSModuleDeclaration = TSModuleDeclaration;
|
38 | exports.TSNamedTupleMember = TSNamedTupleMember;
|
39 | exports.TSNamespaceExportDeclaration = TSNamespaceExportDeclaration;
|
40 | exports.TSNeverKeyword = TSNeverKeyword;
|
41 | exports.TSNonNullExpression = TSNonNullExpression;
|
42 | exports.TSNullKeyword = TSNullKeyword;
|
43 | exports.TSNumberKeyword = TSNumberKeyword;
|
44 | exports.TSObjectKeyword = TSObjectKeyword;
|
45 | exports.TSOptionalType = TSOptionalType;
|
46 | exports.TSParameterProperty = TSParameterProperty;
|
47 | exports.TSParenthesizedType = TSParenthesizedType;
|
48 | exports.TSPropertySignature = TSPropertySignature;
|
49 | exports.TSQualifiedName = TSQualifiedName;
|
50 | exports.TSRestType = TSRestType;
|
51 | exports.TSStringKeyword = TSStringKeyword;
|
52 | exports.TSSymbolKeyword = TSSymbolKeyword;
|
53 | exports.TSThisType = TSThisType;
|
54 | exports.TSTupleType = TSTupleType;
|
55 | exports.TSTypeAliasDeclaration = TSTypeAliasDeclaration;
|
56 | exports.TSTypeAnnotation = TSTypeAnnotation;
|
57 | exports.TSTypeAssertion = TSTypeAssertion;
|
58 | exports.TSTypeLiteral = TSTypeLiteral;
|
59 | exports.TSTypeOperator = TSTypeOperator;
|
60 | exports.TSTypeParameter = TSTypeParameter;
|
61 | exports.TSTypeParameterDeclaration = exports.TSTypeParameterInstantiation = TSTypeParameterInstantiation;
|
62 | exports.TSTypePredicate = TSTypePredicate;
|
63 | exports.TSTypeQuery = TSTypeQuery;
|
64 | exports.TSTypeReference = TSTypeReference;
|
65 | exports.TSUndefinedKeyword = TSUndefinedKeyword;
|
66 | exports.TSUnionType = TSUnionType;
|
67 | exports.TSUnknownKeyword = TSUnknownKeyword;
|
68 | exports.TSVoidKeyword = TSVoidKeyword;
|
69 | exports.tsPrintClassMemberModifiers = tsPrintClassMemberModifiers;
|
70 | exports.tsPrintFunctionOrConstructorType = tsPrintFunctionOrConstructorType;
|
71 | exports.tsPrintPropertyOrMethodName = tsPrintPropertyOrMethodName;
|
72 | exports.tsPrintSignatureDeclarationBase = tsPrintSignatureDeclarationBase;
|
73 | exports.tsPrintTypeLiteralOrInterfaceBody = tsPrintTypeLiteralOrInterfaceBody;
|
74 | function TSTypeAnnotation(node) {
|
75 | this.tokenChar(58);
|
76 | this.space();
|
77 | if (node.optional) this.tokenChar(63);
|
78 | this.print(node.typeAnnotation, node);
|
79 | }
|
80 | function TSTypeParameterInstantiation(node, parent) {
|
81 | this.tokenChar(60);
|
82 | this.printList(node.params, node, {});
|
83 | if (parent.type === "ArrowFunctionExpression" && node.params.length === 1) {
|
84 | this.tokenChar(44);
|
85 | }
|
86 | this.tokenChar(62);
|
87 | }
|
88 | function TSTypeParameter(node) {
|
89 | if (node.in) {
|
90 | this.word("in");
|
91 | this.space();
|
92 | }
|
93 | if (node.out) {
|
94 | this.word("out");
|
95 | this.space();
|
96 | }
|
97 | this.word(node.name);
|
98 | if (node.constraint) {
|
99 | this.space();
|
100 | this.word("extends");
|
101 | this.space();
|
102 | this.print(node.constraint, node);
|
103 | }
|
104 | if (node.default) {
|
105 | this.space();
|
106 | this.tokenChar(61);
|
107 | this.space();
|
108 | this.print(node.default, node);
|
109 | }
|
110 | }
|
111 | function TSParameterProperty(node) {
|
112 | if (node.accessibility) {
|
113 | this.word(node.accessibility);
|
114 | this.space();
|
115 | }
|
116 | if (node.readonly) {
|
117 | this.word("readonly");
|
118 | this.space();
|
119 | }
|
120 | this._param(node.parameter);
|
121 | }
|
122 | function TSDeclareFunction(node, parent) {
|
123 | if (node.declare) {
|
124 | this.word("declare");
|
125 | this.space();
|
126 | }
|
127 | this._functionHead(node, parent);
|
128 | this.tokenChar(59);
|
129 | }
|
130 | function TSDeclareMethod(node) {
|
131 | this._classMethodHead(node);
|
132 | this.tokenChar(59);
|
133 | }
|
134 | function TSQualifiedName(node) {
|
135 | this.print(node.left, node);
|
136 | this.tokenChar(46);
|
137 | this.print(node.right, node);
|
138 | }
|
139 | function TSCallSignatureDeclaration(node) {
|
140 | this.tsPrintSignatureDeclarationBase(node);
|
141 | this.tokenChar(59);
|
142 | }
|
143 | function TSConstructSignatureDeclaration(node) {
|
144 | this.word("new");
|
145 | this.space();
|
146 | this.tsPrintSignatureDeclarationBase(node);
|
147 | this.tokenChar(59);
|
148 | }
|
149 | function TSPropertySignature(node) {
|
150 | const {
|
151 | readonly
|
152 | } = node;
|
153 | if (readonly) {
|
154 | this.word("readonly");
|
155 | this.space();
|
156 | }
|
157 | this.tsPrintPropertyOrMethodName(node);
|
158 | this.print(node.typeAnnotation, node);
|
159 | this.tokenChar(59);
|
160 | }
|
161 | function tsPrintPropertyOrMethodName(node) {
|
162 | if (node.computed) {
|
163 | this.tokenChar(91);
|
164 | }
|
165 | this.print(node.key, node);
|
166 | if (node.computed) {
|
167 | this.tokenChar(93);
|
168 | }
|
169 | if (node.optional) {
|
170 | this.tokenChar(63);
|
171 | }
|
172 | }
|
173 | function TSMethodSignature(node) {
|
174 | const {
|
175 | kind
|
176 | } = node;
|
177 | if (kind === "set" || kind === "get") {
|
178 | this.word(kind);
|
179 | this.space();
|
180 | }
|
181 | this.tsPrintPropertyOrMethodName(node);
|
182 | this.tsPrintSignatureDeclarationBase(node);
|
183 | this.tokenChar(59);
|
184 | }
|
185 | function TSIndexSignature(node) {
|
186 | const {
|
187 | readonly,
|
188 | static: isStatic
|
189 | } = node;
|
190 | if (isStatic) {
|
191 | this.word("static");
|
192 | this.space();
|
193 | }
|
194 | if (readonly) {
|
195 | this.word("readonly");
|
196 | this.space();
|
197 | }
|
198 | this.tokenChar(91);
|
199 | this._parameters(node.parameters, node);
|
200 | this.tokenChar(93);
|
201 | this.print(node.typeAnnotation, node);
|
202 | this.tokenChar(59);
|
203 | }
|
204 | function TSAnyKeyword() {
|
205 | this.word("any");
|
206 | }
|
207 | function TSBigIntKeyword() {
|
208 | this.word("bigint");
|
209 | }
|
210 | function TSUnknownKeyword() {
|
211 | this.word("unknown");
|
212 | }
|
213 | function TSNumberKeyword() {
|
214 | this.word("number");
|
215 | }
|
216 | function TSObjectKeyword() {
|
217 | this.word("object");
|
218 | }
|
219 | function TSBooleanKeyword() {
|
220 | this.word("boolean");
|
221 | }
|
222 | function TSStringKeyword() {
|
223 | this.word("string");
|
224 | }
|
225 | function TSSymbolKeyword() {
|
226 | this.word("symbol");
|
227 | }
|
228 | function TSVoidKeyword() {
|
229 | this.word("void");
|
230 | }
|
231 | function TSUndefinedKeyword() {
|
232 | this.word("undefined");
|
233 | }
|
234 | function TSNullKeyword() {
|
235 | this.word("null");
|
236 | }
|
237 | function TSNeverKeyword() {
|
238 | this.word("never");
|
239 | }
|
240 | function TSIntrinsicKeyword() {
|
241 | this.word("intrinsic");
|
242 | }
|
243 | function TSThisType() {
|
244 | this.word("this");
|
245 | }
|
246 | function TSFunctionType(node) {
|
247 | this.tsPrintFunctionOrConstructorType(node);
|
248 | }
|
249 | function TSConstructorType(node) {
|
250 | if (node.abstract) {
|
251 | this.word("abstract");
|
252 | this.space();
|
253 | }
|
254 | this.word("new");
|
255 | this.space();
|
256 | this.tsPrintFunctionOrConstructorType(node);
|
257 | }
|
258 | function tsPrintFunctionOrConstructorType(node) {
|
259 | const {
|
260 | typeParameters
|
261 | } = node;
|
262 | const parameters = node.parameters;
|
263 | this.print(typeParameters, node);
|
264 | this.tokenChar(40);
|
265 | this._parameters(parameters, node);
|
266 | this.tokenChar(41);
|
267 | this.space();
|
268 | this.token("=>");
|
269 | this.space();
|
270 | const returnType = node.typeAnnotation;
|
271 | this.print(returnType.typeAnnotation, node);
|
272 | }
|
273 | function TSTypeReference(node) {
|
274 | this.print(node.typeName, node, true);
|
275 | this.print(node.typeParameters, node, true);
|
276 | }
|
277 | function TSTypePredicate(node) {
|
278 | if (node.asserts) {
|
279 | this.word("asserts");
|
280 | this.space();
|
281 | }
|
282 | this.print(node.parameterName);
|
283 | if (node.typeAnnotation) {
|
284 | this.space();
|
285 | this.word("is");
|
286 | this.space();
|
287 | this.print(node.typeAnnotation.typeAnnotation);
|
288 | }
|
289 | }
|
290 | function TSTypeQuery(node) {
|
291 | this.word("typeof");
|
292 | this.space();
|
293 | this.print(node.exprName);
|
294 | if (node.typeParameters) {
|
295 | this.print(node.typeParameters, node);
|
296 | }
|
297 | }
|
298 | function TSTypeLiteral(node) {
|
299 | this.tsPrintTypeLiteralOrInterfaceBody(node.members, node);
|
300 | }
|
301 | function tsPrintTypeLiteralOrInterfaceBody(members, node) {
|
302 | tsPrintBraced(this, members, node);
|
303 | }
|
304 | function tsPrintBraced(printer, members, node) {
|
305 | printer.token("{");
|
306 | if (members.length) {
|
307 | printer.indent();
|
308 | printer.newline();
|
309 | for (const member of members) {
|
310 | printer.print(member, node);
|
311 | printer.newline();
|
312 | }
|
313 | printer.dedent();
|
314 | }
|
315 | printer.rightBrace(node);
|
316 | }
|
317 | function TSArrayType(node) {
|
318 | this.print(node.elementType, node, true);
|
319 | this.token("[]");
|
320 | }
|
321 | function TSTupleType(node) {
|
322 | this.tokenChar(91);
|
323 | this.printList(node.elementTypes, node);
|
324 | this.tokenChar(93);
|
325 | }
|
326 | function TSOptionalType(node) {
|
327 | this.print(node.typeAnnotation, node);
|
328 | this.tokenChar(63);
|
329 | }
|
330 | function TSRestType(node) {
|
331 | this.token("...");
|
332 | this.print(node.typeAnnotation, node);
|
333 | }
|
334 | function TSNamedTupleMember(node) {
|
335 | this.print(node.label, node);
|
336 | if (node.optional) this.tokenChar(63);
|
337 | this.tokenChar(58);
|
338 | this.space();
|
339 | this.print(node.elementType, node);
|
340 | }
|
341 | function TSUnionType(node) {
|
342 | tsPrintUnionOrIntersectionType(this, node, "|");
|
343 | }
|
344 | function TSIntersectionType(node) {
|
345 | tsPrintUnionOrIntersectionType(this, node, "&");
|
346 | }
|
347 | function tsPrintUnionOrIntersectionType(printer, node, sep) {
|
348 | printer.printJoin(node.types, node, {
|
349 | separator() {
|
350 | this.space();
|
351 | this.token(sep);
|
352 | this.space();
|
353 | }
|
354 | });
|
355 | }
|
356 | function TSConditionalType(node) {
|
357 | this.print(node.checkType);
|
358 | this.space();
|
359 | this.word("extends");
|
360 | this.space();
|
361 | this.print(node.extendsType);
|
362 | this.space();
|
363 | this.tokenChar(63);
|
364 | this.space();
|
365 | this.print(node.trueType);
|
366 | this.space();
|
367 | this.tokenChar(58);
|
368 | this.space();
|
369 | this.print(node.falseType);
|
370 | }
|
371 | function TSInferType(node) {
|
372 | this.token("infer");
|
373 | this.space();
|
374 | this.print(node.typeParameter);
|
375 | }
|
376 | function TSParenthesizedType(node) {
|
377 | this.tokenChar(40);
|
378 | this.print(node.typeAnnotation, node);
|
379 | this.tokenChar(41);
|
380 | }
|
381 | function TSTypeOperator(node) {
|
382 | this.word(node.operator);
|
383 | this.space();
|
384 | this.print(node.typeAnnotation, node);
|
385 | }
|
386 | function TSIndexedAccessType(node) {
|
387 | this.print(node.objectType, node, true);
|
388 | this.tokenChar(91);
|
389 | this.print(node.indexType, node);
|
390 | this.tokenChar(93);
|
391 | }
|
392 | function TSMappedType(node) {
|
393 | const {
|
394 | nameType,
|
395 | optional,
|
396 | readonly,
|
397 | typeParameter,
|
398 | typeAnnotation
|
399 | } = node;
|
400 | this.tokenChar(123);
|
401 | this.space();
|
402 | if (readonly) {
|
403 | tokenIfPlusMinus(this, readonly);
|
404 | this.word("readonly");
|
405 | this.space();
|
406 | }
|
407 | this.tokenChar(91);
|
408 | this.word(typeParameter.name);
|
409 | this.space();
|
410 | this.word("in");
|
411 | this.space();
|
412 | this.print(typeParameter.constraint, typeParameter);
|
413 | if (nameType) {
|
414 | this.space();
|
415 | this.word("as");
|
416 | this.space();
|
417 | this.print(nameType, node);
|
418 | }
|
419 | this.tokenChar(93);
|
420 | if (optional) {
|
421 | tokenIfPlusMinus(this, optional);
|
422 | this.tokenChar(63);
|
423 | }
|
424 | if (typeAnnotation) {
|
425 | this.tokenChar(58);
|
426 | this.space();
|
427 | this.print(typeAnnotation, node);
|
428 | }
|
429 | this.space();
|
430 | this.tokenChar(125);
|
431 | }
|
432 | function tokenIfPlusMinus(self, tok) {
|
433 | if (tok !== true) {
|
434 | self.token(tok);
|
435 | }
|
436 | }
|
437 | function TSLiteralType(node) {
|
438 | this.print(node.literal, node);
|
439 | }
|
440 | function TSExpressionWithTypeArguments(node) {
|
441 | this.print(node.expression, node);
|
442 | this.print(node.typeParameters, node);
|
443 | }
|
444 | function TSInterfaceDeclaration(node) {
|
445 | const {
|
446 | declare,
|
447 | id,
|
448 | typeParameters,
|
449 | extends: extendz,
|
450 | body
|
451 | } = node;
|
452 | if (declare) {
|
453 | this.word("declare");
|
454 | this.space();
|
455 | }
|
456 | this.word("interface");
|
457 | this.space();
|
458 | this.print(id, node);
|
459 | this.print(typeParameters, node);
|
460 | if (extendz != null && extendz.length) {
|
461 | this.space();
|
462 | this.word("extends");
|
463 | this.space();
|
464 | this.printList(extendz, node);
|
465 | }
|
466 | this.space();
|
467 | this.print(body, node);
|
468 | }
|
469 | function TSInterfaceBody(node) {
|
470 | this.tsPrintTypeLiteralOrInterfaceBody(node.body, node);
|
471 | }
|
472 | function TSTypeAliasDeclaration(node) {
|
473 | const {
|
474 | declare,
|
475 | id,
|
476 | typeParameters,
|
477 | typeAnnotation
|
478 | } = node;
|
479 | if (declare) {
|
480 | this.word("declare");
|
481 | this.space();
|
482 | }
|
483 | this.word("type");
|
484 | this.space();
|
485 | this.print(id, node);
|
486 | this.print(typeParameters, node);
|
487 | this.space();
|
488 | this.tokenChar(61);
|
489 | this.space();
|
490 | this.print(typeAnnotation, node);
|
491 | this.tokenChar(59);
|
492 | }
|
493 | function TSTypeExpression(node) {
|
494 | var _expression$trailingC;
|
495 | const {
|
496 | type,
|
497 | expression,
|
498 | typeAnnotation
|
499 | } = node;
|
500 | const forceParens = !!((_expression$trailingC = expression.trailingComments) != null && _expression$trailingC.length);
|
501 | this.print(expression, node, true, undefined, forceParens);
|
502 | this.space();
|
503 | this.word(type === "TSAsExpression" ? "as" : "satisfies");
|
504 | this.space();
|
505 | this.print(typeAnnotation, node);
|
506 | }
|
507 | function TSTypeAssertion(node) {
|
508 | const {
|
509 | typeAnnotation,
|
510 | expression
|
511 | } = node;
|
512 | this.tokenChar(60);
|
513 | this.print(typeAnnotation, node);
|
514 | this.tokenChar(62);
|
515 | this.space();
|
516 | this.print(expression, node);
|
517 | }
|
518 | function TSInstantiationExpression(node) {
|
519 | this.print(node.expression, node);
|
520 | this.print(node.typeParameters, node);
|
521 | }
|
522 | function TSEnumDeclaration(node) {
|
523 | const {
|
524 | declare,
|
525 | const: isConst,
|
526 | id,
|
527 | members
|
528 | } = node;
|
529 | if (declare) {
|
530 | this.word("declare");
|
531 | this.space();
|
532 | }
|
533 | if (isConst) {
|
534 | this.word("const");
|
535 | this.space();
|
536 | }
|
537 | this.word("enum");
|
538 | this.space();
|
539 | this.print(id, node);
|
540 | this.space();
|
541 | tsPrintBraced(this, members, node);
|
542 | }
|
543 | function TSEnumMember(node) {
|
544 | const {
|
545 | id,
|
546 | initializer
|
547 | } = node;
|
548 | this.print(id, node);
|
549 | if (initializer) {
|
550 | this.space();
|
551 | this.tokenChar(61);
|
552 | this.space();
|
553 | this.print(initializer, node);
|
554 | }
|
555 | this.tokenChar(44);
|
556 | }
|
557 | function TSModuleDeclaration(node) {
|
558 | const {
|
559 | declare,
|
560 | id
|
561 | } = node;
|
562 | if (declare) {
|
563 | this.word("declare");
|
564 | this.space();
|
565 | }
|
566 | if (!node.global) {
|
567 | this.word(id.type === "Identifier" ? "namespace" : "module");
|
568 | this.space();
|
569 | }
|
570 | this.print(id, node);
|
571 | if (!node.body) {
|
572 | this.tokenChar(59);
|
573 | return;
|
574 | }
|
575 | let body = node.body;
|
576 | while (body.type === "TSModuleDeclaration") {
|
577 | this.tokenChar(46);
|
578 | this.print(body.id, body);
|
579 | body = body.body;
|
580 | }
|
581 | this.space();
|
582 | this.print(body, node);
|
583 | }
|
584 | function TSModuleBlock(node) {
|
585 | tsPrintBraced(this, node.body, node);
|
586 | }
|
587 | function TSImportType(node) {
|
588 | const {
|
589 | argument,
|
590 | qualifier,
|
591 | typeParameters
|
592 | } = node;
|
593 | this.word("import");
|
594 | this.tokenChar(40);
|
595 | this.print(argument, node);
|
596 | this.tokenChar(41);
|
597 | if (qualifier) {
|
598 | this.tokenChar(46);
|
599 | this.print(qualifier, node);
|
600 | }
|
601 | if (typeParameters) {
|
602 | this.print(typeParameters, node);
|
603 | }
|
604 | }
|
605 | function TSImportEqualsDeclaration(node) {
|
606 | const {
|
607 | isExport,
|
608 | id,
|
609 | moduleReference
|
610 | } = node;
|
611 | if (isExport) {
|
612 | this.word("export");
|
613 | this.space();
|
614 | }
|
615 | this.word("import");
|
616 | this.space();
|
617 | this.print(id, node);
|
618 | this.space();
|
619 | this.tokenChar(61);
|
620 | this.space();
|
621 | this.print(moduleReference, node);
|
622 | this.tokenChar(59);
|
623 | }
|
624 | function TSExternalModuleReference(node) {
|
625 | this.token("require(");
|
626 | this.print(node.expression, node);
|
627 | this.tokenChar(41);
|
628 | }
|
629 | function TSNonNullExpression(node) {
|
630 | this.print(node.expression, node);
|
631 | this.tokenChar(33);
|
632 | }
|
633 | function TSExportAssignment(node) {
|
634 | this.word("export");
|
635 | this.space();
|
636 | this.tokenChar(61);
|
637 | this.space();
|
638 | this.print(node.expression, node);
|
639 | this.tokenChar(59);
|
640 | }
|
641 | function TSNamespaceExportDeclaration(node) {
|
642 | this.word("export");
|
643 | this.space();
|
644 | this.word("as");
|
645 | this.space();
|
646 | this.word("namespace");
|
647 | this.space();
|
648 | this.print(node.id, node);
|
649 | }
|
650 | function tsPrintSignatureDeclarationBase(node) {
|
651 | const {
|
652 | typeParameters
|
653 | } = node;
|
654 | const parameters = node.parameters;
|
655 | this.print(typeParameters, node);
|
656 | this.tokenChar(40);
|
657 | this._parameters(parameters, node);
|
658 | this.tokenChar(41);
|
659 | const returnType = node.typeAnnotation;
|
660 | this.print(returnType, node);
|
661 | }
|
662 | function tsPrintClassMemberModifiers(node) {
|
663 | const isField = node.type === "ClassAccessorProperty" || node.type === "ClassProperty";
|
664 | if (isField && node.declare) {
|
665 | this.word("declare");
|
666 | this.space();
|
667 | }
|
668 | if (node.accessibility) {
|
669 | this.word(node.accessibility);
|
670 | this.space();
|
671 | }
|
672 | if (node.static) {
|
673 | this.word("static");
|
674 | this.space();
|
675 | }
|
676 | if (node.override) {
|
677 | this.word("override");
|
678 | this.space();
|
679 | }
|
680 | if (node.abstract) {
|
681 | this.word("abstract");
|
682 | this.space();
|
683 | }
|
684 | if (isField && node.readonly) {
|
685 | this.word("readonly");
|
686 | this.space();
|
687 | }
|
688 | }
|
689 |
|
690 |
|