sicua
Version:
A tool for analyzing project structure and dependencies
44 lines (43 loc) • 1.44 kB
TypeScript
import ts from "typescript";
export declare class NodeTypeGuards {
/**
* Checks if node is a component declaration
*/
static isComponentDeclaration(node: ts.Node): node is ts.FunctionDeclaration | ts.ClassDeclaration;
/**
* Checks if node is a hook call
*/
static isHookCall(node: ts.Node): node is ts.CallExpression;
/**
* Checks if node is a JSX component
*/
static isJsxComponent(node: ts.Node): node is ts.JsxElement | ts.JsxSelfClosingElement;
/**
* Checks if node is an event handler
*/
static isEventHandler(node: ts.Node): node is ts.MethodDeclaration | ts.PropertyDeclaration;
/**
* Checks if node is a state declaration
*/
static isStateDeclaration(node: ts.Node): node is ts.VariableDeclaration;
/**
* Checks if node is an effect declaration
*/
static isEffectCall(node: ts.Node): node is ts.CallExpression;
/**
* Checks if node is a memo declaration
*/
static isMemoCall(node: ts.Node): node is ts.CallExpression;
/**
* Helper to check if JSX element has capitalized name
*/
private static hasCapitalizedName;
/**
* Checks if node is a type reference
*/
static isTypeReference(node: ts.Node): node is ts.TypeReferenceNode;
/**
* Checks if node is an async function
*/
static isAsyncFunction(node: ts.Node): node is ts.FunctionLikeDeclaration;
}