Skip to content

Commit 8db0605

Browse files
author
John Doe
committed
refactor: use esm syntax
1 parent 880e997 commit 8db0605

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

tools/zod2md-jsdocs/src/lib/transformers.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import type { PluginConfig, TransformerExtras } from 'ts-patch';
22
import type * as ts from 'typescript';
3-
4-
const tsInstance: typeof ts = require('typescript');
3+
import tsInstance from 'typescript';
54

65
/**
76
* Generates a JSDoc comment for a given type name and base URL.
@@ -23,7 +22,7 @@ export function generateJSDocComment(
2322
`;
2423
}
2524

26-
function annotateTypeDefinitions(
25+
export function annotateTypeDefinitions(
2726
_program: ts.Program,
2827
pluginConfig: PluginConfig,
2928
extras?: TransformerExtras,
@@ -58,5 +57,4 @@ function annotateTypeDefinitions(
5857
tsLib.visitNode(sourceFile, visitor, tsLib.isSourceFile);
5958
};
6059
}
61-
62-
module.exports = annotateTypeDefinitions;
60+
export default annotateTypeDefinitions;

0 commit comments

Comments
 (0)