Skip to content

Commit

Permalink
fix: remove the no longer used renderTsNodeToString
Browse files Browse the repository at this point in the history
  • Loading branch information
yilun.sun committed Mar 18, 2024
1 parent bd6e252 commit b88f539
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions src/php-parser/helpers/php-doc-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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);
}
}

0 comments on commit b88f539

Please sign in to comment.