Skip to content

Commit 9b9bea4

Browse files
committed
add ts error annotation back and more context in docstring
1 parent e1c1f07 commit 9b9bea4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/compass-collection/src/modules/collection-tab.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import type {
4141
MockDataGeneratorState,
4242
} from '../components/mock-data-generator-modal/types';
4343

44+
// @ts-expect-error TypeScript warns us about importing ESM module from CommonJS module, but we can ignore since this code will be consumed by webpack.
4445
import { faker } from '@faker-js/faker/locale/en';
4546

4647
const DEFAULT_SAMPLE_SIZE = 100;
@@ -715,6 +716,10 @@ function transformFakerSchemaToObject(
715716

716717
/**
717718
* Checks if the method exists and is callable on the faker object.
719+
*
720+
* Note: Only supports the format `module.method` (e.g., `internet.email`).
721+
* Nested modules or other formats are not supported.
722+
* @see {@link https://fakerjs.dev/api/}
718723
*/
719724
function isValidFakerMethod(fakerMethod: string): boolean {
720725
const parts = fakerMethod.split('.');

0 commit comments

Comments
 (0)