Skip to content

Commit 8a55c1b

Browse files
committed
chore: apply suggestions
1 parent 35b1cbd commit 8a55c1b

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

scripts/apidoc/signature.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import type {
1616
} from '../../docs/.vitepress/components/api-docs/method';
1717
import vitepressConfig from '../../docs/.vitepress/config';
1818
import { faker } from '../../src';
19-
import { FakerError } from '../../src/errors/faker-error';
2019
import { formatTypescript, pathOutputDir } from './utils';
2120

2221
export function prettifyMethodName(method: string): string {
@@ -61,7 +60,7 @@ function mdToHtml(md: string): string {
6160
console.debug('Rejected unsafe md:', md);
6261
console.error('Rejected unsafe html:', rawHtml.replace(/>/g, '>'));
6362
console.error('Expected safe html:', safeHtml.replace(/>/g, '>'));
64-
throw new FakerError('Found unsafe html');
63+
throw new Error('Found unsafe html');
6564
}
6665
}
6766

@@ -308,9 +307,7 @@ function extractDefaultFromComment(comment?: Comment): string {
308307
return;
309308
}
310309
if (result[3].trim()) {
311-
throw new FakerError(
312-
`Found description text after the default value:\n${text}`
313-
);
310+
throw new Error(`Found description text after the default value:\n${text}`);
314311
}
315312
comment.shortText = result[1];
316313
return result[2];

0 commit comments

Comments
 (0)