import { ASTNode , ObjectASTNode , PropertyASTNode } from "../parser" ; export const getNodeItemByKey = ( node , key ) : PropertyASTNode | void => { if ( node instanceof ObjectASTNode ) { return node . properties . find ( property => { return property . key . value === key ; } ) as PropertyASTNode ; } return ; } ;