We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b84b769 commit 43c70dbCopy full SHA for 43c70db
packages/compass-collection/src/components/mock-data-generator-modal/script-generation-utils.ts
@@ -29,11 +29,9 @@ export interface ScriptOptions {
29
arrayLengthMap?: ArrayLengthMap;
30
}
31
32
-export interface ScriptResult {
33
- script: string;
34
- success: boolean;
35
- error?: string;
36
-}
+export type ScriptResult =
+ | { script: string; success: true }
+ | { error: string; success: false };
37
38
type DocumentStructure = {
39
[fieldName: string]:
@@ -102,7 +100,6 @@ console.log(\`Successfully inserted \${documents.length} documents into ${escape
102
100
};
103
101
} catch (error) {
104
return {
105
- script: '',
106
success: false,
107
error: error instanceof Error ? error.message : 'Unknown error',
108
0 commit comments