Skip to content

Commit

Permalink
feat: typescript 语言 format 支持
Browse files Browse the repository at this point in the history
  • Loading branch information
xjq7 committed Feb 14, 2023
1 parent 4ca59d8 commit ff3dcc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/hooks/useClangFormat/useClangFormat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function useClangFormat({
}, []);

const format = ({ type, code }: { code: string; type: CodeType }) => {
if (type === CodeType.nodejs) {
if (type === CodeType.nodejs || type === CodeType.ts) {
const formatCode = prettierCodeFormat(code);
if (formatCode) onCodeFormatDone(formatCode);
} else if (
Expand Down

0 comments on commit ff3dcc3

Please sign in to comment.