File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
packages/merge/src/typedefs-mergers Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -18,11 +18,11 @@ const getLinkDirectiveURL = (directive: DirectiveNode): string | undefined => {
18
18
} ;
19
19
20
20
/**
21
- * Directives by default do not carry distinctual metadata, thus are not
22
- * considered distinct by default by this function. However @link directives are
23
- * only considered distinct if they have different URLs.
21
+ * Directives by default do not carry arguments that make them distinct, thus
22
+ * are not considered distinct by default by this function. However @link
23
+ * directives are only considered distinct if they have different URLs.
24
24
*/
25
- const isDirectiveMetadataDistinct = ( directiveA : DirectiveNode , directiveB : DirectiveNode ) => {
25
+ const isDirectiveDistinctByArguments = ( directiveA : DirectiveNode , directiveB : DirectiveNode ) => {
26
26
const isLinkPair = isLinkDirective ( directiveA ) && isLinkDirective ( directiveB ) ;
27
27
return isLinkPair ? getLinkDirectiveURL ( directiveA ) !== getLinkDirectiveURL ( directiveB ) : false ;
28
28
} ;
@@ -35,7 +35,7 @@ function directiveAlreadyExists(
35
35
) : boolean {
36
36
return ! ! directivesArr . find ( directive => {
37
37
const isDirectiveNameMatching = directive . name . value === otherDirective . name . value ;
38
- return isDirectiveNameMatching && ! isDirectiveMetadataDistinct ( directive , otherDirective ) ;
38
+ return isDirectiveNameMatching && ! isDirectiveDistinctByArguments ( directive , otherDirective ) ;
39
39
} ) ;
40
40
}
41
41
You can’t perform that action at this time.
0 commit comments