Skip to content

Commit

Permalink
style: apply automated linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
megalinter-bot committed Sep 21, 2023
1 parent 999feaa commit 5c76436
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/language/helpers/astShortcuts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
import {
isSdsDeclaration,
SdsAnnotatedObject,
SdsAnnotationCall, SdsImport,
SdsAnnotationCall,
SdsImport,
SdsLiteral,
SdsLiteralType, SdsResult, SdsResultList,
SdsLiteralType,
SdsResult,
SdsResultList,
SdsTypeArgument,
SdsTypeArgumentList,
} from '../generated/ast.js';
Expand All @@ -23,13 +26,13 @@ export const literalsOrEmpty = function (node: SdsLiteralType | undefined): SdsL

export const resultsOrEmpty = function (node: SdsResultList | undefined): SdsResult[] {
return node?.results ?? [];
}
};

export const typeArgumentsOrEmpty = function (node: SdsTypeArgumentList | undefined): SdsTypeArgument[] {
return node?.typeArguments ?? [];
};

export const isWildcardImport = function (node: SdsImport): boolean {
const importedNamespace = node.importedNamespace ?? '';
return importedNamespace.endsWith('*')
}
return importedNamespace.endsWith('*');
};

0 comments on commit 5c76436

Please sign in to comment.