/**
 * This file has functions that typeguard the given node/type.
 */ import * as ts from "typescript" ; import * as utils from "tsutils/typeguard/2.8" ; export type AccessExpression = ts . ElementAccessExpression | ts . PropertyAccessExpression ; export function isAccessExpression ( node ) { return ( utils . isElementAccessExpression ( node ) || utils . isPropertyAccessExpression ( node ) ) ; } export function isFunctionLikeDeclaration ( node ) { return ( utils . isArrowFunction ( node ) || utils . isConstructorDeclaration ( node ) || utils . isFunctionDeclaration ( node ) || utils . isFunctionExpression ( node ) || utils . isGetAccessorDeclaration ( node ) || utils . isMethodDeclaration ( node ) || utils . isSetAccessorDeclaration ( node ) ) ; } export function isVariableLikeDeclaration ( node ) { return ( utils . isBindingElement ( node ) || utils . isEnumMember ( node ) || utils . isParameterDeclaration ( node ) || utils . isPropertyAssignment ( node ) || utils . isPropertyDeclaration ( node ) || utils . isPropertySignature ( node ) || utils . isShorthandPropertyAssignment ( node ) || utils . isVariableDeclaration ( node ) ) ; } export function isVariableOrParameterOrPropertyDeclaration ( node ) { return ( utils . isVariableDeclaration ( node ) || utils . isParameterDeclaration ( node ) || utils . isPropertyDeclaration ( node ) ) ; } export function hasExpression ( node ) { return Object . prototype . hasOwnProperty . call ( node , "expression" ) ; }