Skip to content

Commit

Permalink
fix: correct defineConfig parameter typing
Browse files Browse the repository at this point in the history
  • Loading branch information
tinymins committed Dec 23, 2022
1 parent 059a962 commit a9f165c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/types.ts
Expand Up @@ -10,7 +10,7 @@ import type { IApi as IUmiApi } from 'umi';

type IUmiConfig = IUmiApi['config'];

export interface IDumiConfig extends IUmiConfig {
interface IDumiCustomConfig {
resolve: {
docDirs: (string | { type?: string; dir: string })[];
/**
Expand All @@ -32,9 +32,11 @@ export interface IDumiConfig extends IUmiConfig {
// eslint-disable-next-line @typescript-eslint/ban-types
extraRehypePlugins?: (string | Function | [string | Function, object])[];
}
export type IDumiConfig = IDumiCustomConfig & IUmiConfig;

export interface IDumiUserConfig
extends Partial<Omit<IDumiConfig, 'resolve' | 'locales'>> {
extends Partial<Omit<IDumiCustomConfig, 'resolve' | 'locales'>>,
IUmiConfig {
resolve?: Partial<IDumiConfig['resolve']>;
locales?: (
| IDumiConfig['locales'][0]
Expand Down

0 comments on commit a9f165c

Please sign in to comment.