@@ -30,7 +30,7 @@ export interface IFunctionOptions {
30
30
excludeFromAutoComplete ?: boolean ;
31
31
linkedEntityLoadService ?: boolean ;
32
32
capturesCallingObject ?: boolean ;
33
- sync ?: boolean
33
+ supportSync ?: boolean ;
34
34
}
35
35
36
36
export interface IFunctionParameter {
@@ -133,7 +133,7 @@ const REQUIRESADDRESS = "requiresaddress";
133
133
const REQUIRESPARAMETERADDRESSES = "requiresparameteraddresses" ;
134
134
const STREAMING = "streaming" ;
135
135
const VOLATILE = "volatile" ;
136
- const SYNC = "sync " ;
136
+ const SUPPORT_SYNC = "supportsync " ;
137
137
138
138
const TYPE_MAPPINGS = {
139
139
[ ts . SyntaxKind . NumberKeyword ] : "number" ,
@@ -465,7 +465,7 @@ export function parseTree(sourceCode: string, sourceFileName: string): IParseTre
465
465
! options . excludeFromAutoComplete &&
466
466
! options . linkedEntityLoadService &&
467
467
! options . capturesCallingObject &&
468
- ! options . sync
468
+ ! options . supportSync
469
469
) {
470
470
delete functionMetadata . options ;
471
471
} else {
@@ -509,8 +509,8 @@ export function parseTree(sourceCode: string, sourceFileName: string): IParseTre
509
509
delete options . capturesCallingObject ;
510
510
}
511
511
512
- if ( ! options . sync ) {
513
- delete options . sync ;
512
+ if ( ! options . supportSync ) {
513
+ delete options . supportSync ;
514
514
}
515
515
}
516
516
@@ -674,7 +674,7 @@ function getOptions(
674
674
excludeFromAutoComplete : isExcludedFromAutoComplete ( func ) ,
675
675
linkedEntityLoadService : isLinkedEntityLoadService ( func ) ,
676
676
capturesCallingObject : capturesCallingObject ( func ) ,
677
- sync : isSync ( func ) ,
677
+ supportSync : supportSync ( func ) ,
678
678
} ;
679
679
680
680
if ( isAddressRequired ( func ) || isRequiresParameterAddresses ( func ) ) {
@@ -689,14 +689,6 @@ function getOptions(
689
689
}
690
690
}
691
691
692
- if ( isSync ( func ) ) {
693
- if ( ! isInvocationFunction ) {
694
- const functionPosition = getPosition ( func , func . parameters . end ) ;
695
- const errorString = `Since @sync is present, the last function parameter should be of type CustomFunctions.Invocation :` ;
696
- extra . errors . push ( logError ( errorString , functionPosition ) ) ;
697
- }
698
- }
699
-
700
692
if (
701
693
optionsItem . linkedEntityLoadService &&
702
694
( optionsItem . excludeFromAutoComplete ||
@@ -1082,8 +1074,8 @@ function capturesCallingObject(node: ts.Node): boolean {
1082
1074
* Returns true if sync tag found in comments
1083
1075
* @param node jsDocs node
1084
1076
*/
1085
- function isSync ( node : ts . Node ) : boolean {
1086
- return hasTag ( node , SYNC ) ;
1077
+ function supportSync ( node : ts . Node ) : boolean {
1078
+ return hasTag ( node , SUPPORT_SYNC ) ;
1087
1079
}
1088
1080
1089
1081
function containsTag ( tag : ts . JSDocTag , tagName : string ) : boolean {
0 commit comments