Skip to content

Commit

Permalink
fix: fix ast.utils files, run format:fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Eduard Lavuš committed Jan 6, 2021
1 parent 721959e commit b885eb8
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 28 deletions.
2 changes: 1 addition & 1 deletion src/interfaces/ast/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from './map-ast';
export * from './map-ast.utils';
export * from './profile-ast';
export * from './profile-ast.utils';
export * from './profile-ast.utils';
6 changes: 3 additions & 3 deletions src/interfaces/ast/map-ast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@ export interface MapHeaderNode extends MapASTNodeBase {
scope?: string;
name: string;
version: {
major: number,
minor: number,
patch: number
major: number;
minor: number;
patch: number;
};
};
provider: string;
Expand Down
16 changes: 3 additions & 13 deletions src/interfaces/ast/map-ast.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@ import {
MapASTNode,
MapDefinitionNode,
MapDocumentNode,
MapNode,
MapProfileIdNode,
MapHeaderNode,
ObjectLiteralNode,
OperationDefinitionNode,
OutcomeStatementNode,
PrimitiveLiteralNode,
ProviderNode,
SetStatementNode,
StatementConditionNode,
} from './map-ast';
Expand All @@ -32,16 +30,12 @@ export function isOperationDefinitionNode(
return node.kind === 'OperationDefinition';
}

export function isProviderNode(node: MapASTNode): node is ProviderNode {
return node.kind === 'Provider';
}

export function isSetStatementNode(node: MapASTNode): node is SetStatementNode {
return node.kind === 'SetStatement';
}

export function isMapNode(node: MapASTNode): node is MapNode {
return node.kind === 'Map';
export function isMapHeaderNode(node: MapASTNode): node is MapHeaderNode {
return node.kind === 'MapHeader';
}

export function isMapDefinitionNode(
Expand Down Expand Up @@ -104,10 +98,6 @@ export function isHttpCallStatementNode(
return node.kind === 'HttpCallStatement';
}

export function isMapProfileIdNode(node: MapASTNode): node is MapProfileIdNode {
return node.kind === 'ProfileId';
}

export function isInlineCallNode(node: MapASTNode): node is InlineCallNode {
return node.kind === 'InlineCall';
}
6 changes: 3 additions & 3 deletions src/interfaces/ast/profile-ast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ export interface ProfileHeaderNode extends ProfileASTNodeBase, DocumentedNode {
scope?: string;
name: string;
version: {
major: number,
minor: number,
patch: number
major: number;
minor: number;
patch: number;
};
}
/** Node enclosing the whole document */
Expand Down
13 changes: 5 additions & 8 deletions src/interfaces/ast/profile-ast.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ import {
PrimitiveTypeNameNode,
ProfileASTNode,
ProfileDocumentNode,
ProfileIdNode,
ProfileNode,
ProfileHeaderNode,
Type,
TypeDefinition,
TypeName,
Expand Down Expand Up @@ -116,12 +115,10 @@ export function isUseCaseDefinitionNode(
return node.kind === 'UseCaseDefinition';
}

export function isProfileIdNode(node: ProfileASTNode): node is ProfileIdNode {
return node.kind === 'ProfileId';
}

export function isProfileNode(node: ProfileASTNode): node is ProfileNode {
return node.kind === 'Profile';
export function isProfileHeaderNode(
node: ProfileASTNode
): node is ProfileHeaderNode {
return node.kind === 'ProfileHeader';
}

export function isProfileDocumentNode(
Expand Down

0 comments on commit b885eb8

Please sign in to comment.