UNPKG

@rightcapital/phpdoc-parser

Version:

TypeScript version of PHPDoc parser with support for intersection types and generics

11 lines (10 loc) 1.41 kB
import { type EnumDeclaration, type ExportDeclaration, type HeritageClause, type ImportDeclaration, type InterfaceDeclaration, type ModifierSyntaxKind, type Node, ScriptKind, ScriptTarget, type SourceFile, type Statement, type TypeElement, type TypeParameterDeclaration } from 'typescript'; export declare function createSourceFileRoot(fileName: string, sourceText?: string, scriptTarget?: ScriptTarget, scriptKind?: ScriptKind): SourceFile; export declare function addStatementsToNode(sourceFile: SourceFile, newStatements: Statement[]): SourceFile; export declare function createImportDeclarationNode(symbols: string[], filePath: string): ImportDeclaration; export declare function createExportDeclarationNode(symbols: string[], moduleSpecifierString?: string): ExportDeclaration; export declare function createInterfaceNode(interfaceName: string, members?: TypeElement[], typeParameters?: TypeParameterDeclaration[], heritageClauses?: HeritageClause[]): InterfaceDeclaration; export declare function createCommentNode(commentText: string, isMultiLine?: boolean, hasTrailingNewLine?: boolean): Statement; export declare function createEnumNode(enumName: string, members: [string, number | string][], modifiers: ModifierSyntaxKind[]): EnumDeclaration; export declare function renderTsNodeToString(tsNode: Node): string; export declare function renderTsSourceFileToString(sourceFile: SourceFile): string;