diff --git a/src/php-parser/helpers/php-doc-helpers.ts b/src/php-parser/helpers/php-doc-helpers.ts index 6efcfe5..c1bc0be 100644 --- a/src/php-parser/helpers/php-doc-helpers.ts +++ b/src/php-parser/helpers/php-doc-helpers.ts @@ -11,16 +11,7 @@ import { type NameNodePathResolver, renderTsNodeToString, } from '@rightcapital/phpdoc-parser'; -import { - EmitHint, - type ImportDeclaration, - NewLineKind, - ScriptKind, - ScriptTarget, - type TypeNode, - createPrinter, - createSourceFile, -} from 'typescript'; +import type { ImportDeclaration, TypeNode } from 'typescript'; import { ExtendedTranspiler } from './extended-php-doc-transpiler'; import { FilePathHelpers } from './file-path-helpers'; import type { IUses } from './node-retriever-helpers'; @@ -134,19 +125,4 @@ export class PhpDocHelpers { } return varTagValueNode; } - - private static renderTsNodeToString( - tsNode: TypeNode | ImportDeclaration, - ): string { - const printer = createPrinter({ newLine: NewLineKind.LineFeed }); - - const resultFile = createSourceFile( - 'virtual-file-for-generation.ts', - '', - ScriptTarget.Latest, - /* setParentNodes */ false, - ScriptKind.TS, - ); - return printer.printNode(EmitHint.Unspecified, tsNode, resultFile); - } }