@typespec/compiler 0.62.0-dev.9 → 0.62.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/generated-defs/TypeSpec.Prototypes.d.ts +6 -0
- package/dist/generated-defs/TypeSpec.Prototypes.d.ts.map +1 -0
- package/dist/generated-defs/TypeSpec.Prototypes.js +2 -0
- package/dist/generated-defs/TypeSpec.Prototypes.js.map +1 -0
- package/dist/generated-defs/TypeSpec.Prototypes.ts-test.d.ts +2 -0
- package/dist/generated-defs/TypeSpec.Prototypes.ts-test.d.ts.map +1 -0
- package/dist/generated-defs/TypeSpec.Prototypes.ts-test.js +5 -0
- package/dist/generated-defs/TypeSpec.Prototypes.ts-test.js.map +1 -0
- package/dist/generated-defs/TypeSpec.d.ts +148 -8
- package/dist/generated-defs/TypeSpec.d.ts.map +1 -1
- package/dist/manifest.js +2 -2
- package/dist/src/core/binder.d.ts +8 -0
- package/dist/src/core/binder.d.ts.map +1 -1
- package/dist/src/core/binder.js +107 -43
- package/dist/src/core/binder.js.map +1 -1
- package/dist/src/core/checker.d.ts +3 -7
- package/dist/src/core/checker.d.ts.map +1 -1
- package/dist/src/core/checker.js +341 -824
- package/dist/src/core/checker.js.map +1 -1
- package/dist/src/core/cli/utils.js +1 -1
- package/dist/src/core/cli/utils.js.map +1 -1
- package/dist/src/core/diagnostics.d.ts +5 -1
- package/dist/src/core/diagnostics.d.ts.map +1 -1
- package/dist/src/core/diagnostics.js +33 -4
- package/dist/src/core/diagnostics.js.map +1 -1
- package/dist/src/core/helpers/operation-utils.d.ts.map +1 -1
- package/dist/src/core/helpers/operation-utils.js +4 -1
- package/dist/src/core/helpers/operation-utils.js.map +1 -1
- package/dist/src/core/helpers/syntax-utils.d.ts +2 -0
- package/dist/src/core/helpers/syntax-utils.d.ts.map +1 -1
- package/dist/src/core/helpers/syntax-utils.js +11 -0
- package/dist/src/core/helpers/syntax-utils.js.map +1 -1
- package/dist/src/core/index.d.ts +1 -1
- package/dist/src/core/index.d.ts.map +1 -1
- package/dist/src/core/index.js +1 -1
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/core/inspector/node.d.ts +2 -0
- package/dist/src/core/inspector/node.d.ts.map +1 -0
- package/dist/src/core/inspector/node.js +35 -0
- package/dist/src/core/inspector/node.js.map +1 -0
- package/dist/src/core/inspector/symbol.d.ts +3 -0
- package/dist/src/core/inspector/symbol.d.ts.map +1 -0
- package/dist/src/core/inspector/symbol.js +84 -0
- package/dist/src/core/inspector/symbol.js.map +1 -0
- package/dist/src/core/logger/console-sink.d.ts +1 -0
- package/dist/src/core/logger/console-sink.d.ts.map +1 -1
- package/dist/src/core/logger/console-sink.js +22 -6
- package/dist/src/core/logger/console-sink.js.map +1 -1
- package/dist/src/core/logger/logger.js +1 -1
- package/dist/src/core/logger/logger.js.map +1 -1
- package/dist/src/core/messages.d.ts +99 -43
- package/dist/src/core/messages.d.ts.map +1 -1
- package/dist/src/core/messages.js +29 -13
- package/dist/src/core/messages.js.map +1 -1
- package/dist/src/core/name-resolver.d.ts +107 -0
- package/dist/src/core/name-resolver.d.ts.map +1 -0
- package/dist/src/core/name-resolver.js +989 -0
- package/dist/src/core/name-resolver.js.map +1 -0
- package/dist/src/core/program.d.ts.map +1 -1
- package/dist/src/core/program.js +14 -4
- package/dist/src/core/program.js.map +1 -1
- package/dist/src/core/semantic-walker.d.ts.map +1 -1
- package/dist/src/core/semantic-walker.js +3 -1
- package/dist/src/core/semantic-walker.js.map +1 -1
- package/dist/src/core/type-utils.js +2 -2
- package/dist/src/core/type-utils.js.map +1 -1
- package/dist/src/core/types.d.ts +149 -35
- package/dist/src/core/types.d.ts.map +1 -1
- package/dist/src/core/types.js +9 -0
- package/dist/src/core/types.js.map +1 -1
- package/dist/src/index.d.ts +5 -5
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +13 -4
- package/dist/src/index.js.map +1 -1
- package/dist/src/lib/decorators.d.ts +2 -13
- package/dist/src/lib/decorators.d.ts.map +1 -1
- package/dist/src/lib/decorators.js +1 -33
- package/dist/src/lib/decorators.js.map +1 -1
- package/dist/src/lib/intrinsic/decorators.d.ts +5 -0
- package/dist/src/lib/intrinsic/decorators.d.ts.map +1 -0
- package/dist/src/lib/intrinsic/decorators.js +25 -0
- package/dist/src/lib/intrinsic/decorators.js.map +1 -0
- package/dist/src/lib/intrinsic/tsp-index.d.ts +9 -0
- package/dist/src/lib/intrinsic/tsp-index.d.ts.map +1 -0
- package/dist/src/lib/intrinsic/tsp-index.js +11 -0
- package/dist/src/lib/intrinsic/tsp-index.js.map +1 -0
- package/dist/src/lib/paging.d.ts +112 -0
- package/dist/src/lib/paging.d.ts.map +1 -0
- package/dist/src/lib/paging.js +260 -0
- package/dist/src/lib/paging.js.map +1 -0
- package/dist/src/lib/tsp-index.d.ts.map +1 -1
- package/dist/src/lib/tsp-index.js +12 -2
- package/dist/src/lib/tsp-index.js.map +1 -1
- package/dist/src/server/completion.d.ts.map +1 -1
- package/dist/src/server/completion.js +7 -6
- package/dist/src/server/completion.js.map +1 -1
- package/dist/src/server/diagnostics.d.ts +8 -0
- package/dist/src/server/diagnostics.d.ts.map +1 -0
- package/dist/src/server/diagnostics.js +106 -0
- package/dist/src/server/diagnostics.js.map +1 -0
- package/dist/src/server/serverlib.d.ts.map +1 -1
- package/dist/src/server/serverlib.js +18 -43
- package/dist/src/server/serverlib.js.map +1 -1
- package/dist/src/server/type-details.js +3 -2
- package/dist/src/server/type-details.js.map +1 -1
- package/dist/src/server/type-signature.js +2 -1
- package/dist/src/server/type-signature.js.map +1 -1
- package/dist/src/testing/expect.js +1 -1
- package/dist/src/testing/expect.js.map +1 -1
- package/dist/src/testing/test-host.js +1 -1
- package/dist/src/testing/test-host.js.map +1 -1
- package/dist/src/testing/test-utils.d.ts +6 -0
- package/dist/src/testing/test-utils.d.ts.map +1 -1
- package/dist/src/testing/test-utils.js +19 -1
- package/dist/src/testing/test-utils.js.map +1 -1
- package/dist/src/utils/misc.d.ts +6 -5
- package/dist/src/utils/misc.d.ts.map +1 -1
- package/dist/src/utils/misc.js.map +1 -1
- package/lib/intrinsics.tsp +2 -1
- package/lib/prototypes.tsp +18 -0
- package/lib/std/decorators.tsp +151 -7
- package/package.json +6 -8
- package/templates/scaffolding.json +4 -4
- package/dist/src/lib/intrinsic-decorators.d.ts +0 -6
- package/dist/src/lib/intrinsic-decorators.d.ts.map +0 -1
- package/dist/src/lib/intrinsic-decorators.js +0 -17
- package/dist/src/lib/intrinsic-decorators.js.map +0 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DecoratorContext, Type } from "../src/index.js";
|
|
2
|
+
export type GetterDecorator = (context: DecoratorContext, target: Type) => void;
|
|
3
|
+
export type TypeSpecPrototypesDecorators = {
|
|
4
|
+
getter: GetterDecorator;
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=TypeSpec.Prototypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TypeSpec.Prototypes.d.ts","sourceRoot":"","sources":["../../generated-defs/TypeSpec.Prototypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE9D,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,KAAK,IAAI,CAAC;AAEhF,MAAM,MAAM,4BAA4B,GAAG;IACzC,MAAM,EAAE,eAAe,CAAC;CACzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TypeSpec.Prototypes.js","sourceRoot":"","sources":["../../generated-defs/TypeSpec.Prototypes.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TypeSpec.Prototypes.ts-test.d.ts","sourceRoot":"","sources":["../../generated-defs/TypeSpec.Prototypes.ts-test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** An error here would mean that the decorator is not exported or doesn't have the right name. */
|
|
2
|
+
import { $decorators } from "../src/index.js";
|
|
3
|
+
/** An error here would mean that the exported decorator is not using the same signature. Make sure to have export const $decName: DecNameDecorator = (...) => ... */
|
|
4
|
+
const _ = $decorators["TypeSpec.Prototypes"];
|
|
5
|
+
//# sourceMappingURL=TypeSpec.Prototypes.ts-test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TypeSpec.Prototypes.ts-test.js","sourceRoot":"","sources":["../../generated-defs/TypeSpec.Prototypes.ts-test.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,qKAAqK;AACrK,MAAM,CAAC,GAAiC,WAAW,CAAC,qBAAqB,CAAC,CAAC"}
|
|
@@ -292,13 +292,6 @@ export type MaxValueExclusiveDecorator = (context: DecoratorContext, target: Sca
|
|
|
292
292
|
* ```
|
|
293
293
|
*/
|
|
294
294
|
export type SecretDecorator = (context: DecoratorContext, target: Scalar | ModelProperty) => void;
|
|
295
|
-
/**
|
|
296
|
-
* Mark this operation as a `list` operation for resource types.
|
|
297
|
-
*
|
|
298
|
-
* @deprecated Use the `listsResource` decorator in `@typespec/rest` instead.
|
|
299
|
-
* @param listedType Optional type of the items in the list.
|
|
300
|
-
*/
|
|
301
|
-
export type ListDecorator = (context: DecoratorContext, target: Operation, listedType?: Model) => void;
|
|
302
295
|
/**
|
|
303
296
|
* Attaches a tag to an operation, interface, or namespace. Multiple `@tag` decorators can be specified to attach multiple tags to a TypeSpec element.
|
|
304
297
|
*
|
|
@@ -519,6 +512,144 @@ export type VisibilityDecorator = (context: DecoratorContext, target: ModelPrope
|
|
|
519
512
|
* ```
|
|
520
513
|
*/
|
|
521
514
|
export type WithVisibilityDecorator = (context: DecoratorContext, target: Model, ...visibilities: string[]) => void;
|
|
515
|
+
/**
|
|
516
|
+
* Mark this operation as a `list` operation that returns a paginated list of items.
|
|
517
|
+
*/
|
|
518
|
+
export type ListDecorator = (context: DecoratorContext, target: Operation) => void;
|
|
519
|
+
/**
|
|
520
|
+
* Pagination property defining the number of items to skip.
|
|
521
|
+
*
|
|
522
|
+
* @example
|
|
523
|
+
* ```tsp
|
|
524
|
+
* model Page<T> {
|
|
525
|
+
* @pageItems items: T[];
|
|
526
|
+
* }
|
|
527
|
+
* @list op listPets(@offset skip: int32, @pageSize pageSize: int8): Page<Pet>;
|
|
528
|
+
* ```
|
|
529
|
+
*/
|
|
530
|
+
export type OffsetDecorator = (context: DecoratorContext, target: ModelProperty) => void;
|
|
531
|
+
/**
|
|
532
|
+
* Pagination property defining the page index.
|
|
533
|
+
*
|
|
534
|
+
* @example
|
|
535
|
+
* ```tsp
|
|
536
|
+
* model Page<T> {
|
|
537
|
+
* @pageItems items: T[];
|
|
538
|
+
* }
|
|
539
|
+
* @list op listPets(@pageIndex page: int32, @pageSize pageSize: int8): Page<Pet>;
|
|
540
|
+
* ```
|
|
541
|
+
*/
|
|
542
|
+
export type PageIndexDecorator = (context: DecoratorContext, target: ModelProperty) => void;
|
|
543
|
+
/**
|
|
544
|
+
* Specify the pagination parameter that controls the maximum number of items to include in a page.
|
|
545
|
+
*
|
|
546
|
+
* @example
|
|
547
|
+
* ```tsp
|
|
548
|
+
* model Page<T> {
|
|
549
|
+
* @pageItems items: T[];
|
|
550
|
+
* }
|
|
551
|
+
* @list op listPets(@pageIndex page: int32, @pageSize pageSize: int8): Page<Pet>;
|
|
552
|
+
* ```
|
|
553
|
+
*/
|
|
554
|
+
export type PageSizeDecorator = (context: DecoratorContext, target: ModelProperty) => void;
|
|
555
|
+
/**
|
|
556
|
+
* Specify the the property that contains the array of page items.
|
|
557
|
+
*
|
|
558
|
+
* @example
|
|
559
|
+
* ```tsp
|
|
560
|
+
* model Page<T> {
|
|
561
|
+
* @pageItems items: T[];
|
|
562
|
+
* }
|
|
563
|
+
* @list op listPets(@pageIndex page: int32, @pageSize pageSize: int8): Page<Pet>;
|
|
564
|
+
* ```
|
|
565
|
+
*/
|
|
566
|
+
export type PageItemsDecorator = (context: DecoratorContext, target: ModelProperty) => void;
|
|
567
|
+
/**
|
|
568
|
+
* Pagination property defining the token to get to the next page.
|
|
569
|
+
* It MUST be specified both on the request parameter and the response.
|
|
570
|
+
*
|
|
571
|
+
* @example
|
|
572
|
+
* ```tsp
|
|
573
|
+
* model Page<T> {
|
|
574
|
+
* @pageItems items: T[];
|
|
575
|
+
* @continuationToken continuationToken: string;
|
|
576
|
+
* }
|
|
577
|
+
* @list op listPets(@continuationToken continuationToken: string): Page<Pet>;
|
|
578
|
+
* ```
|
|
579
|
+
*/
|
|
580
|
+
export type ContinuationTokenDecorator = (context: DecoratorContext, target: ModelProperty) => void;
|
|
581
|
+
/**
|
|
582
|
+
* Pagination property defining a link to the next page.
|
|
583
|
+
*
|
|
584
|
+
* It is expected that navigating to the link will return the same set of responses as the operation that returned the current page.
|
|
585
|
+
*
|
|
586
|
+
* @example
|
|
587
|
+
* ```tsp
|
|
588
|
+
* model Page<T> {
|
|
589
|
+
* @pageItems items: T[];
|
|
590
|
+
* @nextLink next: url;
|
|
591
|
+
* @prevLink prev: url;
|
|
592
|
+
* @firstLink first: url;
|
|
593
|
+
* @lastLink last: url;
|
|
594
|
+
* }
|
|
595
|
+
* @list op listPets(): Page<Pet>;
|
|
596
|
+
* ```
|
|
597
|
+
*/
|
|
598
|
+
export type NextLinkDecorator = (context: DecoratorContext, target: ModelProperty) => void;
|
|
599
|
+
/**
|
|
600
|
+
* Pagination property defining a link to the previous page.
|
|
601
|
+
*
|
|
602
|
+
* It is expected that navigating to the link will return the same set of responses as the operation that returned the current page.
|
|
603
|
+
*
|
|
604
|
+
* @example
|
|
605
|
+
* ```tsp
|
|
606
|
+
* model Page<T> {
|
|
607
|
+
* @pageItems items: T[];
|
|
608
|
+
* @nextLink next: url;
|
|
609
|
+
* @prevLink prev: url;
|
|
610
|
+
* @firstLink first: url;
|
|
611
|
+
* @lastLink last: url;
|
|
612
|
+
* }
|
|
613
|
+
* @list op listPets(): Page<Pet>;
|
|
614
|
+
* ```
|
|
615
|
+
*/
|
|
616
|
+
export type PrevLinkDecorator = (context: DecoratorContext, target: ModelProperty) => void;
|
|
617
|
+
/**
|
|
618
|
+
* Pagination property defining a link to the first page.
|
|
619
|
+
*
|
|
620
|
+
* It is expected that navigating to the link will return the same set of responses as the operation that returned the current page.
|
|
621
|
+
*
|
|
622
|
+
* @example
|
|
623
|
+
* ```tsp
|
|
624
|
+
* model Page<T> {
|
|
625
|
+
* @pageItems items: T[];
|
|
626
|
+
* @nextLink next: url;
|
|
627
|
+
* @prevLink prev: url;
|
|
628
|
+
* @firstLink first: url;
|
|
629
|
+
* @lastLink last: url;
|
|
630
|
+
* }
|
|
631
|
+
* @list op listPets(): Page<Pet>;
|
|
632
|
+
* ```
|
|
633
|
+
*/
|
|
634
|
+
export type FirstLinkDecorator = (context: DecoratorContext, target: ModelProperty) => void;
|
|
635
|
+
/**
|
|
636
|
+
* Pagination property defining a link to the last page.
|
|
637
|
+
*
|
|
638
|
+
* It is expected that navigating to the link will return the same set of responses as the operation that returned the current page.
|
|
639
|
+
*
|
|
640
|
+
* @example
|
|
641
|
+
* ```tsp
|
|
642
|
+
* model Page<T> {
|
|
643
|
+
* @pageItems items: T[];
|
|
644
|
+
* @nextLink next: url;
|
|
645
|
+
* @prevLink prev: url;
|
|
646
|
+
* @firstLink first: url;
|
|
647
|
+
* @lastLink last: url;
|
|
648
|
+
* }
|
|
649
|
+
* @list op listPets(): Page<Pet>;
|
|
650
|
+
* ```
|
|
651
|
+
*/
|
|
652
|
+
export type LastLinkDecorator = (context: DecoratorContext, target: ModelProperty) => void;
|
|
522
653
|
/**
|
|
523
654
|
* A debugging decorator used to inspect a type.
|
|
524
655
|
*
|
|
@@ -569,7 +700,6 @@ export type TypeSpecDecorators = {
|
|
|
569
700
|
minValueExclusive: MinValueExclusiveDecorator;
|
|
570
701
|
maxValueExclusive: MaxValueExclusiveDecorator;
|
|
571
702
|
secret: SecretDecorator;
|
|
572
|
-
list: ListDecorator;
|
|
573
703
|
tag: TagDecorator;
|
|
574
704
|
friendlyName: FriendlyNameDecorator;
|
|
575
705
|
knownValues: KnownValuesDecorator;
|
|
@@ -582,6 +712,16 @@ export type TypeSpecDecorators = {
|
|
|
582
712
|
opExample: OpExampleDecorator;
|
|
583
713
|
visibility: VisibilityDecorator;
|
|
584
714
|
withVisibility: WithVisibilityDecorator;
|
|
715
|
+
list: ListDecorator;
|
|
716
|
+
offset: OffsetDecorator;
|
|
717
|
+
pageIndex: PageIndexDecorator;
|
|
718
|
+
pageSize: PageSizeDecorator;
|
|
719
|
+
pageItems: PageItemsDecorator;
|
|
720
|
+
continuationToken: ContinuationTokenDecorator;
|
|
721
|
+
nextLink: NextLinkDecorator;
|
|
722
|
+
prevLink: PrevLinkDecorator;
|
|
723
|
+
firstLink: FirstLinkDecorator;
|
|
724
|
+
lastLink: LastLinkDecorator;
|
|
585
725
|
inspectType: InspectTypeDecorator;
|
|
586
726
|
inspectTypeName: InspectTypeNameDecorator;
|
|
587
727
|
parameterVisibility: ParameterVisibilityDecorator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypeSpec.d.ts","sourceRoot":"","sources":["../../generated-defs/TypeSpec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,IAAI,EACJ,SAAS,EACT,SAAS,EACT,KAAK,EACL,aAAa,EACb,SAAS,EACT,OAAO,EACP,SAAS,EACT,MAAM,EACN,IAAI,EACJ,KAAK,EACL,YAAY,EACb,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,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E,iBAAiB,CAAC;IAC5B,SAAS,EAAE,kBAAkB,CAAC;IAC9B,iBAAiB,EAAE,0BAA0B,CAAC;IAC9C,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,SAAS,EAAE,kBAAkB,CAAC;IAC9B,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,WAAW,EAAE,oBAAoB,CAAC;IAClC,eAAe,EAAE,wBAAwB,CAAC;IAC1C,mBAAmB,EAAE,4BAA4B,CAAC;IAClD,oBAAoB,EAAE,6BAA6B,CAAC;CACrD,CAAC"}
|
package/dist/manifest.js
CHANGED
|
@@ -3,6 +3,8 @@ import { JsSourceFileNode, Node, Sym, SymbolFlags, SymbolTable, TypeSpecScriptNo
|
|
|
3
3
|
declare const SymbolTable: {
|
|
4
4
|
new (source?: SymbolTable): {
|
|
5
5
|
duplicates: Map<Sym, Set<Sym>>;
|
|
6
|
+
/** {@inheritdoc MutableSymboleTable} */
|
|
7
|
+
include(source: SymbolTable, parentSym?: Sym): void;
|
|
6
8
|
set(key: string, value: Sym): any;
|
|
7
9
|
clear(): void;
|
|
8
10
|
delete(key: string): boolean;
|
|
@@ -25,5 +27,11 @@ export interface Binder {
|
|
|
25
27
|
export declare function createSymbolTable(source?: SymbolTable): SymbolTable;
|
|
26
28
|
export declare function createBinder(program: Program): Binder;
|
|
27
29
|
export declare function createSymbol(node: Node | undefined, name: string, flags: SymbolFlags, parent?: Sym, value?: any): Sym;
|
|
30
|
+
/**
|
|
31
|
+
* Get the node attached to this symbol.
|
|
32
|
+
* If a declaration symbol get the first one `.declarations[0]`
|
|
33
|
+
* Otherwise get `.node`
|
|
34
|
+
*/
|
|
35
|
+
export declare function getSymNode(sym: Sym): Node;
|
|
28
36
|
export {};
|
|
29
37
|
//# sourceMappingURL=binder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binder.d.ts","sourceRoot":"","sources":["../../../src/core/binder.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,
|
|
1
|
+
{"version":3,"file":"binder.d.ts","sourceRoot":"","sources":["../../../src/core/binder.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAcL,gBAAgB,EAMhB,IAAI,EAWJ,GAAG,EACH,WAAW,EACX,WAAW,EAGX,kBAAkB,EAInB,MAAM,YAAY,CAAC;AAKpB,QAAA,MAAM,WAAW;kBAGM,WAAW;;QAOhC,wCAAwC;wBACxB,WAAW,cAAc,GAAG;iBAUnC,MAAM,SAAS,GAAG;;;;;;;;;;;;;;CAkB5B,CAAC;AAEF,MAAM,WAAW,MAAM;IACrB,cAAc,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACjD,gBAAgB,CAAC,UAAU,EAAE,gBAAgB,GAAG,IAAI,CAAC;CAKtD;AAED,wBAAgB,iBAAiB,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,WAAW,CAEnE;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAsnBrD;AAwBD,wBAAgB,YAAY,CAC1B,IAAI,EAAE,IAAI,GAAG,SAAS,EACtB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,WAAW,EAClB,MAAM,CAAC,EAAE,GAAG,EACZ,KAAK,CAAC,EAAE,GAAG,GACV,GAAG,CA0BL;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CAEzC"}
|
package/dist/src/core/binder.js
CHANGED
|
@@ -11,13 +11,16 @@ const SymbolTable = class extends Map {
|
|
|
11
11
|
constructor(source) {
|
|
12
12
|
super();
|
|
13
13
|
if (source) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
14
|
+
this.include(source);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
/** {@inheritdoc MutableSymboleTable} */
|
|
18
|
+
include(source, parentSym) {
|
|
19
|
+
for (const [key, value] of source) {
|
|
20
|
+
super.set(key, { ...value, parent: parentSym ?? value.parent });
|
|
21
|
+
}
|
|
22
|
+
for (const [key, value] of source.duplicates) {
|
|
23
|
+
this.duplicates.set(key, new Set(value));
|
|
21
24
|
}
|
|
22
25
|
}
|
|
23
26
|
// First set for a given key wins, but record all duplicates for diagnostics.
|
|
@@ -27,8 +30,8 @@ const SymbolTable = class extends Map {
|
|
|
27
30
|
super.set(key, value);
|
|
28
31
|
}
|
|
29
32
|
else {
|
|
30
|
-
if (existing.flags &
|
|
31
|
-
mutate(existing).flags |=
|
|
33
|
+
if (existing.flags & 32768 /* SymbolFlags.Using */) {
|
|
34
|
+
mutate(existing).flags |= 65536 /* SymbolFlags.DuplicateUsing */;
|
|
32
35
|
}
|
|
33
36
|
const duplicateArray = this.duplicates.get(existing);
|
|
34
37
|
if (duplicateArray) {
|
|
@@ -69,7 +72,7 @@ export function createBinder(program) {
|
|
|
69
72
|
return;
|
|
70
73
|
}
|
|
71
74
|
fileNamespace = undefined;
|
|
72
|
-
mutate(sourceFile).symbol = createSymbol(sourceFile, sourceFile.file.path,
|
|
75
|
+
mutate(sourceFile).symbol = createSymbol(sourceFile, sourceFile.file.path, 131072 /* SymbolFlags.SourceFile */ | 1048576 /* SymbolFlags.Declaration */);
|
|
73
76
|
const rootNs = sourceFile.esmExports["namespace"];
|
|
74
77
|
for (const [key, member] of Object.entries(sourceFile.esmExports)) {
|
|
75
78
|
let name;
|
|
@@ -143,10 +146,10 @@ export function createBinder(program) {
|
|
|
143
146
|
flags: 0 /* NodeFlags.None */,
|
|
144
147
|
symbol: undefined,
|
|
145
148
|
};
|
|
146
|
-
const sym = createSymbol(jsNamespaceNode, part,
|
|
149
|
+
const sym = createSymbol(jsNamespaceNode, part, 256 /* SymbolFlags.Namespace */ | 1048576 /* SymbolFlags.Declaration */, containerSymbol);
|
|
147
150
|
mutate(jsNamespaceNode).symbol = sym;
|
|
148
151
|
if (existingBinding) {
|
|
149
|
-
if (existingBinding.flags &
|
|
152
|
+
if (existingBinding.flags & 256 /* SymbolFlags.Namespace */) {
|
|
150
153
|
// since the namespace was "declared" as part of this source file,
|
|
151
154
|
// we can simply re-use it.
|
|
152
155
|
containerSymbol = existingBinding;
|
|
@@ -165,11 +168,11 @@ export function createBinder(program) {
|
|
|
165
168
|
let sym;
|
|
166
169
|
if (kind === "decorator") {
|
|
167
170
|
tracer.trace("decorator", `Bound decorator "@${name}" in namespace "${nsParts.join(".")}".`);
|
|
168
|
-
sym = createSymbol(sourceFile, "@" + name,
|
|
171
|
+
sym = createSymbol(sourceFile, "@" + name, 1024 /* SymbolFlags.Decorator */ | 1048576 /* SymbolFlags.Declaration */ | 2097152 /* SymbolFlags.Implementation */, containerSymbol);
|
|
169
172
|
}
|
|
170
173
|
else {
|
|
171
174
|
tracer.trace("function", `Bound function "${name}" in namespace "${nsParts.join(".")}".`);
|
|
172
|
-
sym = createSymbol(sourceFile, name,
|
|
175
|
+
sym = createSymbol(sourceFile, name, 8192 /* SymbolFlags.Function */ | 1048576 /* SymbolFlags.Declaration */ | 2097152 /* SymbolFlags.Implementation */, containerSymbol);
|
|
173
176
|
}
|
|
174
177
|
mutate(sym).value = fn;
|
|
175
178
|
mutate(containerSymbol.exports).set(sym.name, sym);
|
|
@@ -190,7 +193,7 @@ export function createBinder(program) {
|
|
|
190
193
|
return;
|
|
191
194
|
}
|
|
192
195
|
mutate(script).locals = createSymbolTable();
|
|
193
|
-
mutate(script).symbol = createSymbol(script, script.file.path,
|
|
196
|
+
mutate(script).symbol = createSymbol(script, script.file.path, 131072 /* SymbolFlags.SourceFile */);
|
|
194
197
|
mutate(script.symbol).exports = createSymbolTable();
|
|
195
198
|
fileNamespace = undefined;
|
|
196
199
|
currentFile = script;
|
|
@@ -209,9 +212,18 @@ export function createBinder(program) {
|
|
|
209
212
|
case SyntaxKind.ModelExpression:
|
|
210
213
|
bindModelExpression(node);
|
|
211
214
|
break;
|
|
215
|
+
case SyntaxKind.ModelProperty:
|
|
216
|
+
bindModelProperty(node);
|
|
217
|
+
break;
|
|
218
|
+
case SyntaxKind.IntersectionExpression:
|
|
219
|
+
bindIntersectionExpression(node);
|
|
220
|
+
break;
|
|
212
221
|
case SyntaxKind.ScalarStatement:
|
|
213
222
|
bindScalarStatement(node);
|
|
214
223
|
break;
|
|
224
|
+
case SyntaxKind.ScalarConstructor:
|
|
225
|
+
bindScalarConstructor(node);
|
|
226
|
+
break;
|
|
215
227
|
case SyntaxKind.InterfaceStatement:
|
|
216
228
|
bindInterfaceStatement(node);
|
|
217
229
|
break;
|
|
@@ -227,6 +239,12 @@ export function createBinder(program) {
|
|
|
227
239
|
case SyntaxKind.EnumStatement:
|
|
228
240
|
bindEnumStatement(node);
|
|
229
241
|
break;
|
|
242
|
+
case SyntaxKind.EnumMember:
|
|
243
|
+
bindEnumMember(node);
|
|
244
|
+
break;
|
|
245
|
+
case SyntaxKind.UnionVariant:
|
|
246
|
+
bindUnionVariant(node);
|
|
247
|
+
break;
|
|
230
248
|
case SyntaxKind.NamespaceStatement:
|
|
231
249
|
bindNamespaceStatement(node);
|
|
232
250
|
break;
|
|
@@ -305,15 +323,15 @@ export function createBinder(program) {
|
|
|
305
323
|
let sym;
|
|
306
324
|
if (table.has(name)) {
|
|
307
325
|
sym = table.get(name);
|
|
308
|
-
if (!(sym.flags &
|
|
326
|
+
if (!(sym.flags & 512 /* SymbolFlags.Projection */)) {
|
|
309
327
|
// clashing with some other decl, report duplicate symbol
|
|
310
|
-
declareSymbol(node,
|
|
328
|
+
declareSymbol(node, 512 /* SymbolFlags.Projection */);
|
|
311
329
|
return;
|
|
312
330
|
}
|
|
313
331
|
mutate(sym.declarations).push(node);
|
|
314
332
|
}
|
|
315
333
|
else {
|
|
316
|
-
sym = createSymbol(node, name,
|
|
334
|
+
sym = createSymbol(node, name, 512 /* SymbolFlags.Projection */ | 1048576 /* SymbolFlags.Declaration */, scope.symbol);
|
|
317
335
|
mutate(table).set(name, sym);
|
|
318
336
|
}
|
|
319
337
|
mutate(node).symbol = sym;
|
|
@@ -359,61 +377,79 @@ export function createBinder(program) {
|
|
|
359
377
|
}
|
|
360
378
|
if (existingSelectors.has(selectorString)) {
|
|
361
379
|
// clashing with a like-named decl with this selector, so throw.
|
|
362
|
-
declareSymbol(node,
|
|
380
|
+
declareSymbol(node, 512 /* SymbolFlags.Projection */);
|
|
363
381
|
return;
|
|
364
382
|
}
|
|
365
383
|
existingSelectors.add(selectorString);
|
|
366
384
|
}
|
|
367
385
|
}
|
|
368
386
|
function bindProjectionParameterDeclaration(node) {
|
|
369
|
-
declareSymbol(node,
|
|
387
|
+
declareSymbol(node, 4096 /* SymbolFlags.ProjectionParameter */ | 1048576 /* SymbolFlags.Declaration */);
|
|
370
388
|
}
|
|
371
389
|
function bindProjectionLambdaParameterDeclaration(node) {
|
|
372
|
-
declareSymbol(node,
|
|
390
|
+
declareSymbol(node, 16384 /* SymbolFlags.FunctionParameter */ | 1048576 /* SymbolFlags.Declaration */);
|
|
373
391
|
}
|
|
374
392
|
function bindProjectionLambdaExpression(node) {
|
|
375
393
|
mutate(node).locals = new SymbolTable();
|
|
376
394
|
}
|
|
377
395
|
function bindTemplateParameterDeclaration(node) {
|
|
378
|
-
declareSymbol(node,
|
|
396
|
+
declareSymbol(node, 2048 /* SymbolFlags.TemplateParameter */ | 1048576 /* SymbolFlags.Declaration */);
|
|
379
397
|
}
|
|
380
398
|
function bindModelStatement(node) {
|
|
381
|
-
declareSymbol(node, 2 /* SymbolFlags.Model */);
|
|
399
|
+
declareSymbol(node, 2 /* SymbolFlags.Model */ | 1048576 /* SymbolFlags.Declaration */);
|
|
382
400
|
// Initialize locals for type parameters
|
|
383
401
|
mutate(node).locals = new SymbolTable();
|
|
384
402
|
}
|
|
385
403
|
function bindModelExpression(node) {
|
|
386
404
|
bindSymbol(node, 2 /* SymbolFlags.Model */);
|
|
387
405
|
}
|
|
406
|
+
function bindModelProperty(node) {
|
|
407
|
+
declareMember(node, 262144 /* SymbolFlags.Member */, node.id.sv);
|
|
408
|
+
}
|
|
409
|
+
function bindIntersectionExpression(node) {
|
|
410
|
+
bindSymbol(node, 2 /* SymbolFlags.Model */);
|
|
411
|
+
}
|
|
388
412
|
function bindScalarStatement(node) {
|
|
389
|
-
declareSymbol(node,
|
|
413
|
+
declareSymbol(node, 4 /* SymbolFlags.Scalar */ | 1048576 /* SymbolFlags.Declaration */);
|
|
390
414
|
// Initialize locals for type parameters
|
|
391
415
|
mutate(node).locals = new SymbolTable();
|
|
392
416
|
}
|
|
417
|
+
function bindScalarConstructor(node) {
|
|
418
|
+
declareMember(node, 262144 /* SymbolFlags.Member */, node.id.sv);
|
|
419
|
+
}
|
|
393
420
|
function bindInterfaceStatement(node) {
|
|
394
|
-
declareSymbol(node,
|
|
421
|
+
declareSymbol(node, 32 /* SymbolFlags.Interface */ | 1048576 /* SymbolFlags.Declaration */);
|
|
395
422
|
mutate(node).locals = new SymbolTable();
|
|
396
423
|
}
|
|
397
424
|
function bindUnionStatement(node) {
|
|
398
|
-
declareSymbol(node,
|
|
425
|
+
declareSymbol(node, 64 /* SymbolFlags.Union */ | 1048576 /* SymbolFlags.Declaration */);
|
|
399
426
|
mutate(node).locals = new SymbolTable();
|
|
400
427
|
}
|
|
401
428
|
function bindAliasStatement(node) {
|
|
402
|
-
declareSymbol(node,
|
|
429
|
+
declareSymbol(node, 128 /* SymbolFlags.Alias */ | 1048576 /* SymbolFlags.Declaration */);
|
|
403
430
|
// Initialize locals for type parameters
|
|
404
431
|
mutate(node).locals = new SymbolTable();
|
|
405
432
|
}
|
|
406
433
|
function bindConstStatement(node) {
|
|
407
|
-
declareSymbol(node,
|
|
434
|
+
declareSymbol(node, 524288 /* SymbolFlags.Const */ | 1048576 /* SymbolFlags.Declaration */);
|
|
408
435
|
}
|
|
409
436
|
function bindEnumStatement(node) {
|
|
410
|
-
declareSymbol(node,
|
|
437
|
+
declareSymbol(node, 16 /* SymbolFlags.Enum */ | 1048576 /* SymbolFlags.Declaration */);
|
|
438
|
+
}
|
|
439
|
+
function bindEnumMember(node) {
|
|
440
|
+
declareMember(node, 262144 /* SymbolFlags.Member */, node.id.sv);
|
|
441
|
+
}
|
|
442
|
+
function bindUnionVariant(node) {
|
|
443
|
+
// cannot bind non named variant `union A { "a", "b"}`
|
|
444
|
+
if (node.id) {
|
|
445
|
+
declareMember(node, 262144 /* SymbolFlags.Member */, node.id.sv);
|
|
446
|
+
}
|
|
411
447
|
}
|
|
412
448
|
function bindNamespaceStatement(statement) {
|
|
413
449
|
const effectiveScope = fileNamespace ?? scope;
|
|
414
450
|
// check if there's an existing symbol for this namespace
|
|
415
451
|
const existingBinding = effectiveScope.symbol.exports.get(statement.id.sv);
|
|
416
|
-
if (existingBinding && existingBinding.flags &
|
|
452
|
+
if (existingBinding && existingBinding.flags & 256 /* SymbolFlags.Namespace */) {
|
|
417
453
|
mutate(statement).symbol = existingBinding;
|
|
418
454
|
// locals are never shared.
|
|
419
455
|
mutate(statement).locals = createSymbolTable();
|
|
@@ -422,7 +458,7 @@ export function createBinder(program) {
|
|
|
422
458
|
else {
|
|
423
459
|
// Initialize locals for non-exported symbols
|
|
424
460
|
mutate(statement).locals = createSymbolTable();
|
|
425
|
-
declareSymbol(statement,
|
|
461
|
+
declareSymbol(statement, 256 /* SymbolFlags.Namespace */ | 1048576 /* SymbolFlags.Declaration */);
|
|
426
462
|
}
|
|
427
463
|
currentFile.namespaces.push(statement);
|
|
428
464
|
if (statement.statements === undefined) {
|
|
@@ -438,29 +474,33 @@ export function createBinder(program) {
|
|
|
438
474
|
mutate(currentFile.usings).push(statement);
|
|
439
475
|
}
|
|
440
476
|
function bindOperationStatement(statement) {
|
|
441
|
-
if (scope.kind
|
|
442
|
-
|
|
477
|
+
if (scope.kind === SyntaxKind.InterfaceStatement) {
|
|
478
|
+
declareMember(statement, 8 /* SymbolFlags.Operation */ | 262144 /* SymbolFlags.Member */ | 1048576 /* SymbolFlags.Declaration */, statement.id.sv);
|
|
479
|
+
}
|
|
480
|
+
else {
|
|
481
|
+
declareSymbol(statement, 8 /* SymbolFlags.Operation */ | 1048576 /* SymbolFlags.Declaration */);
|
|
443
482
|
}
|
|
444
483
|
mutate(statement).locals = createSymbolTable();
|
|
445
484
|
}
|
|
446
485
|
function bindDecoratorDeclarationStatement(node) {
|
|
447
|
-
declareSymbol(node,
|
|
486
|
+
declareSymbol(node, 1024 /* SymbolFlags.Decorator */ | 1048576 /* SymbolFlags.Declaration */, `@${node.id.sv}`);
|
|
448
487
|
}
|
|
449
488
|
function bindFunctionDeclarationStatement(node) {
|
|
450
|
-
declareSymbol(node,
|
|
489
|
+
declareSymbol(node, 8192 /* SymbolFlags.Function */ | 1048576 /* SymbolFlags.Declaration */);
|
|
451
490
|
}
|
|
452
491
|
function bindFunctionParameter(node) {
|
|
453
|
-
const symbol = createSymbol(node, node.id.sv,
|
|
492
|
+
const symbol = createSymbol(node, node.id.sv, 16384 /* SymbolFlags.FunctionParameter */ | 1048576 /* SymbolFlags.Declaration */, scope.symbol);
|
|
454
493
|
mutate(node).symbol = symbol;
|
|
455
494
|
}
|
|
456
495
|
/**
|
|
457
|
-
* Declare a
|
|
496
|
+
* Declare a symbol for the given node in the current scope.
|
|
458
497
|
* @param node Node
|
|
459
498
|
* @param flags Symbol flags
|
|
460
499
|
* @param name Optional symbol name, default to the node id.
|
|
461
500
|
* @returns Created Symbol
|
|
462
501
|
*/
|
|
463
502
|
function declareSymbol(node, flags, name) {
|
|
503
|
+
compilerAssert(flags & 1048576 /* SymbolFlags.Declaration */, `Expected declaration symbol: ${name}`, node);
|
|
464
504
|
switch (scope.kind) {
|
|
465
505
|
case SyntaxKind.NamespaceStatement:
|
|
466
506
|
return declareNamespaceMember(node, flags, name);
|
|
@@ -481,7 +521,7 @@ export function createBinder(program) {
|
|
|
481
521
|
return symbol;
|
|
482
522
|
}
|
|
483
523
|
function declareNamespaceMember(node, flags, name) {
|
|
484
|
-
if (flags &
|
|
524
|
+
if (flags & 256 /* SymbolFlags.Namespace */ &&
|
|
485
525
|
mergeNamespaceDeclarations(node, scope)) {
|
|
486
526
|
return;
|
|
487
527
|
}
|
|
@@ -493,7 +533,7 @@ export function createBinder(program) {
|
|
|
493
533
|
}
|
|
494
534
|
function declareScriptMember(node, flags, name) {
|
|
495
535
|
const effectiveScope = fileNamespace ?? scope;
|
|
496
|
-
if (flags &
|
|
536
|
+
if (flags & 256 /* SymbolFlags.Namespace */ &&
|
|
497
537
|
mergeNamespaceDeclarations(node, effectiveScope)) {
|
|
498
538
|
return;
|
|
499
539
|
}
|
|
@@ -503,10 +543,22 @@ export function createBinder(program) {
|
|
|
503
543
|
mutate(effectiveScope.symbol.exports).set(key, symbol);
|
|
504
544
|
return symbol;
|
|
505
545
|
}
|
|
546
|
+
/**
|
|
547
|
+
* Declare a member of a model, enum, union, or interface.
|
|
548
|
+
* @param node node of the member
|
|
549
|
+
* @param flags symbol flags
|
|
550
|
+
* @param name name of the symbol
|
|
551
|
+
*/
|
|
552
|
+
function declareMember(node, flags, name) {
|
|
553
|
+
const symbol = createSymbol(node, name, flags, scope.symbol);
|
|
554
|
+
mutate(node).symbol = symbol;
|
|
555
|
+
mutate(scope.symbol.members).set(name, symbol);
|
|
556
|
+
return symbol;
|
|
557
|
+
}
|
|
506
558
|
function mergeNamespaceDeclarations(node, scope) {
|
|
507
559
|
// we are declaring a namespace in either global scope, or a blockless namespace.
|
|
508
560
|
const existingBinding = scope.symbol.exports.get(node.id.sv);
|
|
509
|
-
if (existingBinding && existingBinding.flags &
|
|
561
|
+
if (existingBinding && existingBinding.flags & 256 /* SymbolFlags.Namespace */) {
|
|
510
562
|
// we have an existing binding, so just push this node to its declarations
|
|
511
563
|
mutate(existingBinding.declarations).push(node);
|
|
512
564
|
mutate(node).symbol = existingBinding;
|
|
@@ -518,6 +570,7 @@ export function createBinder(program) {
|
|
|
518
570
|
function hasScope(node) {
|
|
519
571
|
switch (node.kind) {
|
|
520
572
|
case SyntaxKind.ModelStatement:
|
|
573
|
+
case SyntaxKind.ModelExpression:
|
|
521
574
|
case SyntaxKind.ScalarStatement:
|
|
522
575
|
case SyntaxKind.ConstStatement:
|
|
523
576
|
case SyntaxKind.AliasStatement:
|
|
@@ -527,6 +580,7 @@ function hasScope(node) {
|
|
|
527
580
|
case SyntaxKind.UnionStatement:
|
|
528
581
|
case SyntaxKind.Projection:
|
|
529
582
|
case SyntaxKind.ProjectionLambdaExpression:
|
|
583
|
+
case SyntaxKind.EnumStatement:
|
|
530
584
|
return true;
|
|
531
585
|
case SyntaxKind.NamespaceStatement:
|
|
532
586
|
return node.statements !== undefined;
|
|
@@ -536,15 +590,17 @@ function hasScope(node) {
|
|
|
536
590
|
}
|
|
537
591
|
export function createSymbol(node, name, flags, parent, value) {
|
|
538
592
|
let exports;
|
|
539
|
-
if (flags &
|
|
593
|
+
if (flags & 131328 /* SymbolFlags.ExportContainer */) {
|
|
540
594
|
exports = createSymbolTable();
|
|
541
595
|
}
|
|
542
596
|
let members;
|
|
543
|
-
if (flags &
|
|
597
|
+
if (flags & 118 /* SymbolFlags.MemberContainer */) {
|
|
544
598
|
members = createSymbolTable();
|
|
545
599
|
}
|
|
600
|
+
compilerAssert(!(flags & 1048576 /* SymbolFlags.Declaration */) || node !== undefined, "Declaration without node");
|
|
546
601
|
return {
|
|
547
|
-
declarations:
|
|
602
|
+
declarations: flags & 1048576 /* SymbolFlags.Declaration */ ? [node] : [],
|
|
603
|
+
node: !(flags & 1048576 /* SymbolFlags.Declaration */) ? node : undefined,
|
|
548
604
|
name,
|
|
549
605
|
exports,
|
|
550
606
|
members,
|
|
@@ -554,4 +610,12 @@ export function createSymbol(node, name, flags, parent, value) {
|
|
|
554
610
|
metatypeMembers: createSymbolTable(),
|
|
555
611
|
};
|
|
556
612
|
}
|
|
613
|
+
/**
|
|
614
|
+
* Get the node attached to this symbol.
|
|
615
|
+
* If a declaration symbol get the first one `.declarations[0]`
|
|
616
|
+
* Otherwise get `.node`
|
|
617
|
+
*/
|
|
618
|
+
export function getSymNode(sym) {
|
|
619
|
+
return sym.flags & 1048576 /* SymbolFlags.Declaration */ ? sym.declarations[0] : sym.node;
|
|
620
|
+
}
|
|
557
621
|
//# sourceMappingURL=binder.js.map
|