Skip to content

Commit

Permalink
Add types
Browse files Browse the repository at this point in the history
  • Loading branch information
IrishBruse committed Sep 28, 2024
1 parent 23ef6a1 commit 031e9c0
Showing 1 changed file with 38 additions and 4 deletions.
42 changes: 38 additions & 4 deletions src/utils/normalizeModuleFederationOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,8 @@ export type ModuleFederationOptions = {
getPublicPath?: any;
implementation?: any;
manifest?: ManifestOptions | boolean;
dev?: any;
dts?: any;
dev?: boolean | PluginDevOptions;
dts?: boolean | PluginDtsOptions;
shareStrategy: ShareStrategy;
};

Expand All @@ -265,11 +265,45 @@ export interface NormalizedModuleFederationOptions {
getPublicPath: any;
implementation: any;
manifest: ManifestOptions | boolean;
dev: any;
dts: any;
dev?: boolean | PluginDevOptions;
dts?: boolean | PluginDtsOptions;
shareStrategy?: ShareStrategy;
}

interface PluginDevOptions {
disableLiveReload?: boolean;
disableHotTypesReload?: boolean;
disableDynamicRemoteTypeHints?: boolean;
}

interface PluginDtsOptions {
generateTypes?: boolean | DtsRemoteOptions;
consumeTypes?: boolean | DtsHostOptions;
tsConfigPath?: string;
}

interface DtsRemoteOptions {
tsConfigPath?: string;
typesFolder?: string;
deleteTypesFolder?: boolean;
additionalFilesToCompile?: string[];
compilerInstance?: 'tsc' | 'vue-tsc';
compileInChildProcess?: boolean;
generateAPITypes?: boolean;
extractThirdParty?: boolean;
extractRemoteTypes?: boolean;
abortOnError?: boolean;
}

interface DtsHostOptions {
typesFolder?: string;
abortOnError?: boolean;
remoteTypesFolder?: string;
deleteTypesFolder?: boolean;
maxRetries?: number;
consumeAPITypes?: boolean;
}

let config: NormalizedModuleFederationOptions;
export function getNormalizeModuleFederationOptions() {
return config;
Expand Down

0 comments on commit 031e9c0

Please sign in to comment.