Skip to content

Commit

Permalink
fix(types): removed implicit type dependency on json-to-ast's ValueNode
Browse files Browse the repository at this point in the history
  • Loading branch information
grantila committed Nov 24, 2020
1 parent 4fd2961 commit 4465cb7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/location.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ValueNode, IdentifierNode } from 'json-to-ast'
import { ParsedJson } from './parse'
import type { ValueNode, IdentifierNode } from 'json-to-ast'
import type { ParsedJson } from './parse'


export type LocationPath = Array< number | string >;
Expand Down Expand Up @@ -92,7 +92,7 @@ export function getLocation(
return node.children[ Number( pathItem ) ];
} )( )
: node
, jsonAST
, jsonAST as ValueNode
);

return { start: loc?.start, end: loc?.end };
Expand Down
2 changes: 1 addition & 1 deletion lib/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export interface ParsedJson
{
json: any;
jsonString: string;
jsonAST: parse.ValueNode;
jsonAST: unknown;
}

export function getAstByString( jsonString: string, json?: any ): ParsedJson
Expand Down

0 comments on commit 4465cb7

Please sign in to comment.