fix: improve defineConfig types (#4454)

master
Vben 1 year ago committed by GitHub
parent 60cffb0dec
commit d34f1fbf2f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -137,12 +137,12 @@ type ApplicationOptions = ApplicationPluginOptions;
type LibraryOptions = LibraryPluginOptions; type LibraryOptions = LibraryPluginOptions;
type DefineApplicationOptions = (config?: ConfigEnv) => Promise<{ type DefineApplicationOptions = (config: ConfigEnv) => Promise<{
application?: ApplicationOptions; application?: ApplicationOptions;
vite?: UserConfig; vite?: UserConfig;
}>; }>;
type DefineLibraryOptions = (config?: ConfigEnv) => Promise<{ type DefineLibraryOptions = (config: ConfigEnv) => Promise<{
library?: LibraryOptions; library?: LibraryOptions;
vite?: UserConfig; vite?: UserConfig;
}>; }>;

@ -183,7 +183,7 @@ describe('updateSchema', () => {
instance.updateSchema(newSchema); instance.updateSchema(newSchema);
expect(consoleErrorSpy).toHaveBeenCalledWith( expect(consoleErrorSpy).toHaveBeenCalledWith(
'All children of the form Schema array that need to be updated must contain the `field` field', 'All items in the schema array must have a valid `fieldName` property to be updated',
); );
}); });

Loading…
Cancel
Save