Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
robinweser committed Feb 23, 2022
1 parent 7561cfb commit 5eccf8f
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions packages/fela/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ declare module 'fela' {
type CSSObject = CSSProperties & CSSPseudos

type CSSCustom = { [prop: string]: CSSCustomPrimitive | IStyle }
type CSSCustomPrimitive = IStylePrimitiveExtension[keyof IStylePrimitiveExtension]
type CSSCustomPrimitive =
IStylePrimitiveExtension[keyof IStylePrimitiveExtension]

type CSSProperties = CSS.Properties<number | string>
type CSSPropertiesFallback = CSS.PropertiesFallback<number | string>
Expand Down Expand Up @@ -135,9 +136,7 @@ declare module 'fela-dom' {
function render(renderer: IRenderer): void
function rehydrate(renderer: IRenderer): void
function renderToMarkup(renderer: IRenderer): string
function renderToSheetList(
renderer: IRenderer
): {
function renderToSheetList(renderer: IRenderer): {
css: string
type: TRenderType
media?: string
Expand Down Expand Up @@ -217,9 +216,7 @@ declare module 'fela-identifier' {
generator?: (name?: string, index?: number) => string
}

type Identifier = (
name?: string
) => TRule & {
type Identifier = (name?: string) => TRule & {
className: string
toString(): string
}
Expand Down Expand Up @@ -353,9 +350,11 @@ declare module 'fela-plugin-logger' {
declare module 'fela-plugin-named-keys' {
import { TPlugin } from 'fela'

type MediaQueryMap<Props> = ((props: Props) => Record<string, string>) | Record<string, string>;
type MediaQueryMap<Props> =
| ((props: Props) => Record<string, string>)
| Record<string, string>

export default function<Props>(mediaQueryMap: MediaQueryMap<Props>): TPlugin;
export default function <Props>(mediaQueryMap: MediaQueryMap<Props>): TPlugin
}

declare module 'fela-plugin-native-media-query' {
Expand Down Expand Up @@ -450,9 +449,9 @@ declare module 'fela-plugin-validator' {
}

declare module 'fela-plugin-expand-shorthand' {
import { TPlugin } from 'fela';
export default function (autoMerge: boolean = false): TPlugin;
import { TPlugin } from 'fela'

export default function (autoMerge?: boolean): TPlugin
}

/**
Expand Down

0 comments on commit 5eccf8f

Please sign in to comment.