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 => {
1818} ;
1919
2020/**
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.
2424 */
25- const isDirectiveMetadataDistinct = ( directiveA : DirectiveNode , directiveB : DirectiveNode ) => {
25+ const isDirectiveDistinctByArguments = ( directiveA : DirectiveNode , directiveB : DirectiveNode ) => {
2626 const isLinkPair = isLinkDirective ( directiveA ) && isLinkDirective ( directiveB ) ;
2727 return isLinkPair ? getLinkDirectiveURL ( directiveA ) !== getLinkDirectiveURL ( directiveB ) : false ;
2828} ;
@@ -35,7 +35,7 @@ function directiveAlreadyExists(
3535) : boolean {
3636 return ! ! directivesArr . find ( directive => {
3737 const isDirectiveNameMatching = directive . name . value === otherDirective . name . value ;
38- return isDirectiveNameMatching && ! isDirectiveMetadataDistinct ( directive , otherDirective ) ;
38+ return isDirectiveNameMatching && ! isDirectiveDistinctByArguments ( directive , otherDirective ) ;
3939 } ) ;
4040}
4141
You can’t perform that action at this time.
0 commit comments