Skip to content

Commit fea0ee8

Browse files
committed
fix: The method is adjusted to default export.
1 parent dde26f7 commit fea0ee8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import json2ts from '@hacxy/json2ts';
33
/**
44
* Json to typebox
55
*/
6-
export const json2typebox = async (json: string, name: string = 'Root') => {
6+
const json2typebox = async (json: string, name: string = 'Root') => {
77
let tsCode = '';
88
try {
99
tsCode = await json2ts(json, name);
@@ -14,3 +14,5 @@ export const json2typebox = async (json: string, name: string = 'Root') => {
1414
const finalCode = Formatter.Format(code);
1515
return finalCode;
1616
};
17+
18+
export default json2typebox;

0 commit comments

Comments
 (0)