diff --git a/src/loaders/postcss/modules/index.ts b/src/loaders/postcss/modules/index.ts index 70a67df0..f6e133a3 100644 --- a/src/loaders/postcss/modules/index.ts +++ b/src/loaders/postcss/modules/index.ts @@ -1,8 +1,8 @@ import postcss from "postcss"; import modulesValues from "postcss-modules-values"; -import localByDefault, { LocalByDefaultOptions } from "postcss-modules-local-by-default"; -import extractImports, { ExtractImportsOptions } from "postcss-modules-extract-imports"; -import modulesScope, { ScopeOptions } from "postcss-modules-scope"; +import localByDefault, { Options as LocalByDefaultOptions } from "postcss-modules-local-by-default"; +import extractImports, { Options as ExtractImportsOptions } from "postcss-modules-extract-imports"; +import modulesScope, { Options as ScopeOptions } from "postcss-modules-scope"; import generateScopedNameDefault from "./generate"; /** Options for [CSS Modules](https://github.com/css-modules/css-modules) */ diff --git a/src/shims/postcss-modules.d.ts b/src/shims/postcss-modules.d.ts index 85a90257..cec8979d 100644 --- a/src/shims/postcss-modules.d.ts +++ b/src/shims/postcss-modules.d.ts @@ -6,31 +6,21 @@ declare module "postcss-modules-values" { declare module "postcss-modules-local-by-default" { import { Plugin } from "postcss"; - - export interface LocalByDefaultOptions { - mode?: "local" | "global" | "pure"; - } - - export default function (options?: LocalByDefaultOptions): Plugin; + export type Options = { mode?: "local" | "global" | "pure" }; + export default function (options?: Options): Plugin; } declare module "postcss-modules-extract-imports" { import { Plugin } from "postcss"; - - export interface ExtractImportsOptions { - failOnWrongOrder?: boolean; - } - - export default function (options?: ExtractImportsOptions): Plugin; + export type Options = { failOnWrongOrder?: boolean }; + export default function (options?: Options): Plugin; } declare module "postcss-modules-scope" { import { Plugin } from "postcss"; - - export interface ScopeOptions { + export type Options = { exportGlobals?: boolean; generateScopedName?: (name: string, file: string, css: string) => string; - } - - export default function (options?: ScopeOptions): Plugin; + }; + export default function (options?: Options): Plugin; }