From b88f5394a6802a14744ffb664220f081dfaf5139 Mon Sep 17 00:00:00 2001 From: "yilun.sun" Date: Mon, 18 Mar 2024 10:36:34 +0800 Subject: [PATCH] fix: remove the no longer used `renderTsNodeToString` --- src/php-parser/helpers/php-doc-helpers.ts | 26 +---------------------- 1 file changed, 1 insertion(+), 25 deletions(-) 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); - } }