@rightcapital/php-parser
Version:
TypeScript types for PHP Parser JSON representation
15 lines (14 loc) • 810 B
TypeScript
import { type PhpDocNode, type TypeNode as PhpDocTypeNode, type VarTagValueNode } from '@rightcapital/phpdoc-parser';
import type { ImportDeclaration, TypeNode } from 'typescript';
import type { IUses } from './node-retriever-helpers';
export interface ITypeGenerationPackage {
transpiledTypeNode: TypeNode;
importDeclarations: ImportDeclaration[];
outputTsTypeGeneratedString: string;
importDeclarationGeneratedStrings: string[];
}
export declare class PhpDocHelpers {
static parseCommentTextToTagValueNode(commentText: string): VarTagValueNode;
static getTypescriptTypeFromTypeNode(typeNode: PhpDocTypeNode, filePathParts: string[], fileRelativePath: string, uses: IUses): ITypeGenerationPackage;
static getTagValueNodeFromAstRootNode(astRootNode: PhpDocNode): VarTagValueNode;
}