Skip to content

Commit

Permalink
fix(type-defs): make all options optional (#56)
Browse files Browse the repository at this point in the history
* fix(type-defs): make all options optional

* fix(type-defs): create ColorModeConfig type as Partial<ColorModeOptions>

it's nuxtjs convention for ColorModeOptions to hold required properties and the config being a
Partial<T> of that
  • Loading branch information
jankal authored Dec 4, 2020
1 parent 2867137 commit 7d2aaff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions types/color-mode.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,5 @@ export interface ColorModeInstance {
unknown: boolean,
forced: boolean
}

export type ColorModeConfig = Partial<ColorModeOptions>;
4 changes: 2 additions & 2 deletions types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ColorModeOptions, ColorModeInstance } from "./color-mode";
import { ColorModeConfig, ColorModeInstance } from "./color-mode";

declare module '@nuxt/types/config/index' {
interface NuxtOptions {
colorMode: ColorModeOptions
colorMode: ColorModeConfig
}
}

Expand Down

0 comments on commit 7d2aaff

Please sign in to comment.