From 8b22f3f8e4817b1dfa4236d5980afff58a00ca39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Jan=C4=8Da?= Date: Tue, 22 Feb 2022 11:47:50 +0100 Subject: [PATCH] update typescript definitions Update `fela-plugin-named-keys` with function type. Add `fela-plugin-expand-shorthand` type. --- packages/fela/index.d.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/fela/index.d.ts b/packages/fela/index.d.ts index 4c09a645a..6abf61c72 100644 --- a/packages/fela/index.d.ts +++ b/packages/fela/index.d.ts @@ -297,11 +297,9 @@ declare module "fela-plugin-logger" { declare module "fela-plugin-named-keys" { import { TPlugin } from "fela"; - interface MediaQueryMap { - [key: string]: string; - } + type MediaQueryMap = ((props: Props) => Record) | Record; - export default function(mediaQueryMap: MediaQueryMap): TPlugin; + export default function(mediaQueryMap: MediaQueryMap): TPlugin; } declare module "fela-plugin-native-media-query" { @@ -380,6 +378,12 @@ declare module "fela-plugin-validator" { export default function(configs?: Configs): TPlugin; } +declare module 'fela-plugin-expand-shorthand' { + import { TPlugin } from 'fela'; + + export default function (autoMerge: boolean = false): TPlugin; +} + /** * PRESETS */