From b0e7a55053036d1a2e89c1d5f9e8ac1fe9131645 Mon Sep 17 00:00:00 2001 From: gretzky Date: Thu, 31 Jan 2019 10:13:59 -0500 Subject: [PATCH 1/6] [styled-system] fix breakpoints type --- types/styled-system/index.d.ts | 399 +++++++++++++++++---------------- 1 file changed, 201 insertions(+), 198 deletions(-) diff --git a/types/styled-system/index.d.ts b/types/styled-system/index.d.ts index aa94ab2aed..1207718523 100644 --- a/types/styled-system/index.d.ts +++ b/types/styled-system/index.d.ts @@ -9,42 +9,45 @@ // Adam Lavin // Joachim Schuler // Adam Misiorny +// Sara F-P // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 -import * as CSS from "csstype"; +import * as CSS from 'csstype' -export const defaultBreakpoints: string[]; -export function is(n: any): boolean; -export function num(n: any): boolean; -export function px(n: any): string; +export const defaultBreakpoints: string[] +export function is(n: any): boolean +export function num(n: any): boolean +export function px(n: any): string -export function get(obj: any, ...paths: Array): any; +export function get(obj: any, ...paths: Array): any -export function themeGet(keys: string, fallback?: string): any; -export function cloneFunc(fn: (...args: any[]) => any): (...args: any[]) => any; +export function themeGet(keys: string, fallback?: string): any +export function cloneFunc(fn: (...args: any[]) => any): (...args: any[]) => any -export function merge(a: any, b: any): any; +export function merge(a: any, b: any): any export function compose( ...funcs: Array<(...args: any[]) => any> -): (...args: any[]) => any; +): (...args: any[]) => any -export function createMediaQuery(n: number | string): string; +export function createMediaQuery(n: number | string): string export interface LowLevelStylefunctionArguments { - prop: string; - cssProperty?: string; - key?: string; - getter?: () => any; - transformValue?: (n: string | number) => any; - scale?: Array; + prop: string + cssProperty?: string + key?: string + getter?: () => any + transformValue?: (n: string | number) => any + scale?: Array } -export function style(args: LowLevelStylefunctionArguments): {[cssProp: string]: string}; +export function style( + args: LowLevelStylefunctionArguments +): { [cssProp: string]: string } -export type TLengthStyledSystem = string | 0 | number; -export type ResponsiveValue = T | Array | { [key: string]: T }; +export type TLengthStyledSystem = string | 0 | number +export type ResponsiveValue = T | Array | { [key: string]: T } /** * Converts shorthand margin and padding props to margin and padding CSS declarations @@ -58,71 +61,71 @@ export type ResponsiveValue = T | Array | { [key: string]: T }; export interface SpaceProps { /** Margin on top, left, bottom and right */ - m?: ResponsiveValue>; + m?: ResponsiveValue> /** Margin for the top */ - mt?: ResponsiveValue>; + mt?: ResponsiveValue> /** Margin for the right */ - mr?: ResponsiveValue>; + mr?: ResponsiveValue> /** Margin for the bottom */ - mb?: ResponsiveValue>; + mb?: ResponsiveValue> /** Margin for the left */ - ml?: ResponsiveValue>; + ml?: ResponsiveValue> /** Margin for the left and right */ - mx?: ResponsiveValue>; + mx?: ResponsiveValue> /** Margin for the top and bottom */ - my?: ResponsiveValue>; + my?: ResponsiveValue> /** Padding on top, left, bottom and right */ - p?: ResponsiveValue>; + p?: ResponsiveValue> /** Padding for the top */ - pt?: ResponsiveValue>; + pt?: ResponsiveValue> /** Padding for the right */ - pr?: ResponsiveValue>; + pr?: ResponsiveValue> /** Padding for the bottom */ - pb?: ResponsiveValue>; + pb?: ResponsiveValue> /** Padding for the left */ - pl?: ResponsiveValue>; + pl?: ResponsiveValue> /** Padding for the left and right */ - px?: ResponsiveValue>; + px?: ResponsiveValue> /** Padding for the top and bottom */ - py?: ResponsiveValue>; + py?: ResponsiveValue> } -export function space(...args: any[]): any; +export function space(...args: any[]): any export interface VariantArgs { - key?: string; + key?: string // Defaults to "variant" - prop?: string; + prop?: string } -export function variant(props: VariantArgs): (...args: any[]) => any; +export function variant(props: VariantArgs): (...args: any[]) => any -export type ObjectOrArray = T[] | { [K: string]: T }; +export type ObjectOrArray = T[] | { [K: string]: T } export interface BaseTheme { - breakpoints?: number[]; - colors?: ObjectOrArray; - fontSizes?: number[]; - space?: number[]; + breakpoints?: string[] + colors?: ObjectOrArray + fontSizes?: number[] + space?: number[] } export interface Theme extends BaseTheme { - borders?: ObjectOrArray>; - buttons?: ObjectOrArray; - colorStyles?: ObjectOrArray; - fontWeights?: ObjectOrArray; - fonts?: ObjectOrArray; - heights?: ObjectOrArray>; - letterSpacings?: ObjectOrArray>; - lineHeights?: ObjectOrArray>; - maxHeights?: ObjectOrArray>; - maxWidths?: ObjectOrArray>; - minHeights?: ObjectOrArray>; - minWidths?: ObjectOrArray>; - opacity?: ObjectOrArray; - radii?: ObjectOrArray>; - shadows?: ObjectOrArray; - textStyles?: ObjectOrArray; + borders?: ObjectOrArray> + buttons?: ObjectOrArray + colorStyles?: ObjectOrArray + fontWeights?: ObjectOrArray + fonts?: ObjectOrArray + heights?: ObjectOrArray> + letterSpacings?: ObjectOrArray> + lineHeights?: ObjectOrArray> + maxHeights?: ObjectOrArray> + maxWidths?: ObjectOrArray> + minHeights?: ObjectOrArray> + minWidths?: ObjectOrArray> + opacity?: ObjectOrArray + radii?: ObjectOrArray> + shadows?: ObjectOrArray + textStyles?: ObjectOrArray } /** @@ -139,10 +142,10 @@ export interface FontSizeProps { * - And array values are converted into responsive values. * */ - fontSize?: ResponsiveValue>; + fontSize?: ResponsiveValue> } -export function fontSize(...args: any[]): any; +export function fontSize(...args: any[]): any /** * Color @@ -158,10 +161,10 @@ export interface TextColorProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/color) */ - color?: ResponsiveValue; + color?: ResponsiveValue } -export function textColor(...args: any[]): any; +export function textColor(...args: any[]): any export interface BgColorProps { /** @@ -173,22 +176,22 @@ export interface BgColorProps { * * [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/background-color) */ - bg?: ResponsiveValue>; + bg?: ResponsiveValue> } -export function bgColor(...args: any[]): any; +export function bgColor(...args: any[]): any export interface ColorProps extends TextColorProps, BgColorProps {} -export function color(...args: any[]): any; +export function color(...args: any[]): any /** * Typography */ export interface FontFamilyProps { - fontFamily?: ResponsiveValue; + fontFamily?: ResponsiveValue } -export function fontFamily(...args: any[]): any; +export function fontFamily(...args: any[]): any export interface TextAlignProps { /** @@ -196,10 +199,10 @@ export interface TextAlignProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align) */ - textAlign?: ResponsiveValue; + textAlign?: ResponsiveValue } -export function textAlign(...args: any[]): any; +export function textAlign(...args: any[]): any export interface LineHeightProps { /** @@ -210,9 +213,9 @@ export interface LineHeightProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/line-height) */ - lineHeight?: ResponsiveValue>; + lineHeight?: ResponsiveValue> } -export function lineHeight(...args: any[]): any; +export function lineHeight(...args: any[]): any export interface FontWeightProps { /** @@ -222,10 +225,10 @@ export interface FontWeightProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight) */ - fontWeight?: ResponsiveValue; + fontWeight?: ResponsiveValue } -export function fontWeight(...args: any[]): any; +export function fontWeight(...args: any[]): any export interface FontStyleProps { /** @@ -234,9 +237,9 @@ export interface FontStyleProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/font-style) */ - fontStyle?: ResponsiveValue; + fontStyle?: ResponsiveValue } -export function fontStyle(...args: any[]): any; +export function fontStyle(...args: any[]): any export interface LetterSpacingProps { /** @@ -244,9 +247,9 @@ export interface LetterSpacingProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/letter-spacing) */ - letterSpacing?: ResponsiveValue>; + letterSpacing?: ResponsiveValue> } -export function letterSpacing(...args: any[]): any; +export function letterSpacing(...args: any[]): any /** * Layout @@ -260,10 +263,10 @@ export interface DisplayProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/display) */ - display?: ResponsiveValue; + display?: ResponsiveValue } -export function display(...args: any[]): any; +export function display(...args: any[]): any export interface MaxWidthProps { /** @@ -272,10 +275,10 @@ export interface MaxWidthProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/max-width) */ - maxWidth?: ResponsiveValue>; + maxWidth?: ResponsiveValue> } -export function maxWidth(...args: any[]): any; +export function maxWidth(...args: any[]): any export interface MinWidthProps { /** @@ -284,10 +287,10 @@ export interface MinWidthProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/min-width) */ - minWidth?: ResponsiveValue>; + minWidth?: ResponsiveValue> } -export function minWidth(...args: any[]): any; +export function minWidth(...args: any[]): any export interface WidthProps { /** @@ -298,10 +301,10 @@ export interface WidthProps { * - String values are passed as raw CSS values. * - And arrays are converted to responsive width styles. */ - width?: ResponsiveValue>; + width?: ResponsiveValue> } -export function width(...args: any[]): any; +export function width(...args: any[]): any export interface MaxHeightProps { /** @@ -310,10 +313,10 @@ export interface MaxHeightProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/max-height) */ - maxHeight?: ResponsiveValue>; + maxHeight?: ResponsiveValue> } -export function maxHeight(...args: any[]): any; +export function maxHeight(...args: any[]): any export interface MinHeightProps { /** @@ -322,10 +325,10 @@ export interface MinHeightProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/display) */ - minHeight?: ResponsiveValue>; + minHeight?: ResponsiveValue> } -export function minHeight(...args: any[]): any; +export function minHeight(...args: any[]): any export interface HeightProps { /** @@ -334,37 +337,37 @@ export interface HeightProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/height) */ - height?: ResponsiveValue>; + height?: ResponsiveValue> } -export function height(...args: any[]): any; +export function height(...args: any[]): any // TODO: Document, I couldn't find any info on these two properties... export interface SizeWidthProps { - size?: ResponsiveValue>; + size?: ResponsiveValue> } -export function sizeWidth(...args: any[]): any; +export function sizeWidth(...args: any[]): any export interface SizeHeightProps { - size?: ResponsiveValue>; + size?: ResponsiveValue> } -export function sizeHeight(...args: any[]): any; +export function sizeHeight(...args: any[]): any export interface SizeProps extends SizeHeightProps, SizeWidthProps {} -export function size(...args: any[]): any; +export function size(...args: any[]): any export interface RatioProps { /** * The ration is height: 0 & paddingBottom */ - ratio?: ResponsiveValue; + ratio?: ResponsiveValue } -export function ratio(...args: any[]): any; +export function ratio(...args: any[]): any export interface VerticalAlignProps { /** @@ -372,10 +375,10 @@ export interface VerticalAlignProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/vertical-align) */ - verticalAlign?: ResponsiveValue>; + verticalAlign?: ResponsiveValue> } -export function verticalAlign(...args: any[]): any; +export function verticalAlign(...args: any[]): any /** * Flexbox @@ -391,10 +394,10 @@ export interface AlignItemsProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/align-items) */ - alignItems?: ResponsiveValue; + alignItems?: ResponsiveValue } -export function alignItems(...args: any[]): any; +export function alignItems(...args: any[]): any export interface AlignContentProps { /** @@ -403,10 +406,10 @@ export interface AlignContentProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/align-content) */ - alignContent?: ResponsiveValue; + alignContent?: ResponsiveValue } -export function alignContent(...args: any[]): any; +export function alignContent(...args: any[]): any export interface JustifyItemsProps { /** @@ -415,7 +418,7 @@ export interface JustifyItemsProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/justify-items) */ - justifyItems?: ResponsiveValue; + justifyItems?: ResponsiveValue } export interface JustifyContentProps { @@ -425,10 +428,10 @@ export interface JustifyContentProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content) */ - justifyContent?: ResponsiveValue; + justifyContent?: ResponsiveValue } -export function justifyContent(...args: any[]): any; +export function justifyContent(...args: any[]): any export interface FlexWrapProps { /** @@ -437,20 +440,20 @@ export interface FlexWrapProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap) */ - flexWrap?: ResponsiveValue; + flexWrap?: ResponsiveValue } -export function flexWrap(...args: any[]): any; +export function flexWrap(...args: any[]): any export interface FlexBasisProps { // TODO: The FlexBasisValue currently really only exists for documentation // purposes, because flex-basis also accepts `Nem` and `Npx` strings. // Not sure there’s a way to still have the union values show up as // auto-completion results. - flexBasis?: ResponsiveValue>; + flexBasis?: ResponsiveValue> } -export function flexBasis(...args: any[]): any; +export function flexBasis(...args: any[]): any export interface FlexDirectionProps { /** @@ -459,10 +462,10 @@ export interface FlexDirectionProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction) */ - flexDirection?: ResponsiveValue; + flexDirection?: ResponsiveValue } -export function flexDirection(...args: any[]): any; +export function flexDirection(...args: any[]): any export interface FlexProps { /** @@ -471,10 +474,10 @@ export interface FlexProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/flex) */ - flex?: ResponsiveValue>; + flex?: ResponsiveValue> } -export function flex(...args: any[]): any; +export function flex(...args: any[]): any export interface JustifySelfProps { /** @@ -483,10 +486,10 @@ export interface JustifySelfProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/justify-self) */ - justifySelf?: ResponsiveValue; + justifySelf?: ResponsiveValue } -export function justifySelf(...args: any[]): any; +export function justifySelf(...args: any[]): any export interface AlignSelfProps { /** @@ -497,10 +500,10 @@ export interface AlignSelfProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/align-self) */ - alignSelf?: ResponsiveValue; + alignSelf?: ResponsiveValue } -export function alignSelf(...args: any[]): any; +export function alignSelf(...args: any[]): any export interface OrderProps { /** @@ -509,10 +512,10 @@ export interface OrderProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/order) */ - order?: ResponsiveValue; + order?: ResponsiveValue } -export function order(...args: any[]): any; +export function order(...args: any[]): any /** * Grid Layout @@ -527,10 +530,10 @@ export interface GridGapProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/gap) */ - gridGap?: ResponsiveValue>; + gridGap?: ResponsiveValue> } -export function gridGap(...args: any[]): any; +export function gridGap(...args: any[]): any export interface GridColumnGapProps { /** @@ -540,10 +543,10 @@ export interface GridColumnGapProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/column-gap) */ - gridColumnGap?: ResponsiveValue>; + gridColumnGap?: ResponsiveValue> } -export function gridColumnGap(...args: any[]): any; +export function gridColumnGap(...args: any[]): any export interface GridRowGapProps { /** @@ -553,10 +556,10 @@ export interface GridRowGapProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/row-gap) */ - gridRowGap?: ResponsiveValue>; + gridRowGap?: ResponsiveValue> } -export function gridRowGap(...args: any[]): any; +export function gridRowGap(...args: any[]): any export interface GridColumnProps { /** @@ -566,10 +569,10 @@ export interface GridColumnProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column) */ - gridColumn?: ResponsiveValue; + gridColumn?: ResponsiveValue } -export function gridColumn(...args: any[]): any; +export function gridColumn(...args: any[]): any export interface GridRowProps { /** @@ -579,10 +582,10 @@ export interface GridRowProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row) */ - gridRow?: ResponsiveValue; + gridRow?: ResponsiveValue } -export function gridRow(...args: any[]): any; +export function gridRow(...args: any[]): any export interface GridAutoFlowProps { /** @@ -591,10 +594,10 @@ export interface GridAutoFlowProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-flow) */ - gridAutoFlow?: ResponsiveValue; + gridAutoFlow?: ResponsiveValue } -export function gridAutoFlow(...args: any[]): any; +export function gridAutoFlow(...args: any[]): any export interface GridAutoColumnsProps { /** @@ -602,10 +605,10 @@ export interface GridAutoColumnsProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-columns) */ - gridAutoColumns?: ResponsiveValue>; + gridAutoColumns?: ResponsiveValue> } -export function gridAutoColumns(...args: any[]): any; +export function gridAutoColumns(...args: any[]): any export interface GridAutoRowsProps { /** @@ -613,10 +616,10 @@ export interface GridAutoRowsProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-rows) */ - gridAutoRows?: ResponsiveValue>; + gridAutoRows?: ResponsiveValue> } -export function gridAutoRows(...args: any[]): any; +export function gridAutoRows(...args: any[]): any export interface GridTemplatesColumnsProps { /** @@ -626,10 +629,10 @@ export interface GridTemplatesColumnsProps { */ gridTemplateColumns?: ResponsiveValue< CSS.GridTemplateColumnsProperty - >; + > } -export function gridTemplateColumns(...args: any[]): any; +export function gridTemplateColumns(...args: any[]): any export interface GridTemplatesRowsProps { /** @@ -637,10 +640,10 @@ export interface GridTemplatesRowsProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/row-template-rows) */ - gridTemplateRows?: ResponsiveValue>; + gridTemplateRows?: ResponsiveValue> } -export function gridTemplateRows(...args: any[]): any; +export function gridTemplateRows(...args: any[]): any export interface GridTemplatesAreasProps { /** @@ -648,10 +651,10 @@ export interface GridTemplatesAreasProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-areas) */ - gridTemplateAreas?: ResponsiveValue; + gridTemplateAreas?: ResponsiveValue } -export function gridTemplateAreas(...args: any[]): any; +export function gridTemplateAreas(...args: any[]): any export interface GridAreaProps { /** @@ -661,10 +664,10 @@ export interface GridAreaProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-area) */ - gridArea?: ResponsiveValue; + gridArea?: ResponsiveValue } -export function gridArea(...args: any[]): any; +export function gridArea(...args: any[]): any /** * Borders @@ -677,10 +680,10 @@ export interface BorderProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border) */ - border?: ResponsiveValue>; + border?: ResponsiveValue> } -export function border(...args: any[]): any; +export function border(...args: any[]): any export interface BorderTopProps { /** @@ -689,10 +692,10 @@ export interface BorderTopProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-top) */ - borderTop?: ResponsiveValue>; + borderTop?: ResponsiveValue> } -export function borderTop(...args: any[]): any; +export function borderTop(...args: any[]): any export interface BorderRightProps { /** @@ -701,10 +704,10 @@ export interface BorderRightProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-right) */ - borderRight?: ResponsiveValue>; + borderRight?: ResponsiveValue> } -export function borderRight(...args: any[]): any; +export function borderRight(...args: any[]): any export interface BorderBottomProps { /** @@ -713,10 +716,10 @@ export interface BorderBottomProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom) */ - borderBottom?: ResponsiveValue>; + borderBottom?: ResponsiveValue> } -export function borderBottom(...args: any[]): any; +export function borderBottom(...args: any[]): any export interface BorderLeftProps { /** @@ -725,10 +728,10 @@ export interface BorderLeftProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-left) */ - borderLeft?: ResponsiveValue>; + borderLeft?: ResponsiveValue> } -export function borderLeft(...args: any[]): any; +export function borderLeft(...args: any[]): any export interface BordersProps extends BorderTopProps, @@ -736,7 +739,7 @@ export interface BordersProps BorderBottomProps, BorderLeftProps {} -export function borders(...args: any[]): any; +export function borders(...args: any[]): any export interface BorderColorProps { /** @@ -744,10 +747,10 @@ export interface BorderColorProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-color) */ - borderColor?: ResponsiveValue; + borderColor?: ResponsiveValue } -export function borderColor(...args: any[]): any; +export function borderColor(...args: any[]): any export interface BorderRadiusProps { /** @@ -756,10 +759,10 @@ export interface BorderRadiusProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius) */ - borderRadius?: ResponsiveValue>; + borderRadius?: ResponsiveValue> } -export function borderRadius(...args: any[]): any; +export function borderRadius(...args: any[]): any export interface BoxShadowProps { /** @@ -769,10 +772,10 @@ export interface BoxShadowProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow) */ - boxShadow?: ResponsiveValue; + boxShadow?: ResponsiveValue } -export function boxShadow(...arg: any[]): any; +export function boxShadow(...arg: any[]): any export interface OpacityProps { /** @@ -781,10 +784,10 @@ export interface OpacityProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/opacity) */ - opacity?: ResponsiveValue; + opacity?: ResponsiveValue } -export function opacity(...arg: any[]): any; +export function opacity(...arg: any[]): any export interface OverflowProps { /** @@ -793,10 +796,10 @@ export interface OverflowProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/overflow) */ - overflow?: ResponsiveValue; + overflow?: ResponsiveValue } -export function overflow(...arg: any[]): any; +export function overflow(...arg: any[]): any /** * Background */ @@ -808,10 +811,10 @@ export interface BackgroundProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/background) */ - background?: ResponsiveValue>; + background?: ResponsiveValue> } -export function background(...args: any[]): any; +export function background(...args: any[]): any export interface BackgroundImageProps { /** @@ -819,10 +822,10 @@ export interface BackgroundImageProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/background-image) */ - backgroundImage?: ResponsiveValue; + backgroundImage?: ResponsiveValue } -export function backgroundImage(...args: any[]): any; +export function backgroundImage(...args: any[]): any export interface BackgroundSizeProps { /** @@ -831,10 +834,10 @@ export interface BackgroundSizeProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size) */ - backgroundSize?: ResponsiveValue>; + backgroundSize?: ResponsiveValue> } -export function backgroundSize(...args: any[]): any; +export function backgroundSize(...args: any[]): any export interface BackgroundPositionProps { /** @@ -845,10 +848,10 @@ export interface BackgroundPositionProps { */ backgroundPosition?: ResponsiveValue< CSS.BackgroundPositionProperty - >; + > } -export function backgroundPosition(...args: any[]): any; +export function backgroundPosition(...args: any[]): any export interface BackgroundRepeatProps { /** @@ -857,10 +860,10 @@ export interface BackgroundRepeatProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/background-repeat) */ - backgroundRepeat?: ResponsiveValue; + backgroundRepeat?: ResponsiveValue } -export function backgroundRepeat(...args: any[]): any; +export function backgroundRepeat(...args: any[]): any /** * Position @@ -873,10 +876,10 @@ export interface PositionProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/position) */ - position?: ResponsiveValue; + position?: ResponsiveValue } -export function position(...args: any[]): any; +export function position(...args: any[]): any export interface ZIndexProps { /** @@ -885,10 +888,10 @@ export interface ZIndexProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/z-index) */ - zIndex?: ResponsiveValue; + zIndex?: ResponsiveValue } -export function zIndex(...args: any[]): any; +export function zIndex(...args: any[]): any export interface TopProps { /** @@ -897,10 +900,10 @@ export interface TopProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/top) */ - top?: ResponsiveValue>; + top?: ResponsiveValue> } -export function top(...args: any[]): any; +export function top(...args: any[]): any export interface RightProps { /** @@ -909,10 +912,10 @@ export interface RightProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/right) */ - right?: ResponsiveValue>; + right?: ResponsiveValue> } -export function right(...args: any[]): any; +export function right(...args: any[]): any export interface BottomProps { /** @@ -921,10 +924,10 @@ export interface BottomProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/top) */ - bottom?: ResponsiveValue>; + bottom?: ResponsiveValue> } -export function bottom(...args: any[]): any; +export function bottom(...args: any[]): any export interface LeftProps { /** @@ -933,33 +936,33 @@ export interface LeftProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/left) */ - left?: ResponsiveValue>; + left?: ResponsiveValue> } -export function left(...args: any[]): any; +export function left(...args: any[]): any export interface TextStyleProps { - textStyle?: ResponsiveValue; + textStyle?: ResponsiveValue } -export function textStyle(...args: any[]): any; +export function textStyle(...args: any[]): any export interface ColorStyleProps { - colors?: ResponsiveValue; + colors?: ResponsiveValue } -export function colorStyle(...args: any[]): any; +export function colorStyle(...args: any[]): any export interface ButtonStyleProps { - variant?: ResponsiveValue; + variant?: ResponsiveValue } -export function buttonStyle(...args: any[]): any; +export function buttonStyle(...args: any[]): any export interface MixedProps { - key?: any; + key?: any // Defaults to "variant" - prop?: string; + prop?: string } -export function mixed(...args: any[]): any; +export function mixed(...args: any[]): any From b1ffb3b01f5a0703616c03b8dba7bb9e6e2ce77b Mon Sep 17 00:00:00 2001 From: gretzky Date: Thu, 31 Jan 2019 10:17:48 -0500 Subject: [PATCH 2/6] [styled-system] add object type to breakpoints --- types/styled-system/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/styled-system/index.d.ts b/types/styled-system/index.d.ts index 1207718523..67f1f87ba0 100644 --- a/types/styled-system/index.d.ts +++ b/types/styled-system/index.d.ts @@ -103,7 +103,7 @@ export function variant(props: VariantArgs): (...args: any[]) => any export type ObjectOrArray = T[] | { [K: string]: T } export interface BaseTheme { - breakpoints?: string[] + breakpoints?: string[] | Object colors?: ObjectOrArray fontSizes?: number[] space?: number[] From 83accda4872dbbbc6744be7211d74f959c290a71 Mon Sep 17 00:00:00 2001 From: gretzky Date: Thu, 31 Jan 2019 10:18:53 -0500 Subject: [PATCH 3/6] [styled-system] re-add number[] for posterity --- types/styled-system/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/styled-system/index.d.ts b/types/styled-system/index.d.ts index 67f1f87ba0..e2cdd2cddf 100644 --- a/types/styled-system/index.d.ts +++ b/types/styled-system/index.d.ts @@ -103,7 +103,7 @@ export function variant(props: VariantArgs): (...args: any[]) => any export type ObjectOrArray = T[] | { [K: string]: T } export interface BaseTheme { - breakpoints?: string[] | Object + breakpoints?: string[] | number[] | Object colors?: ObjectOrArray fontSizes?: number[] space?: number[] From d65aee88646ba3d9bec5c560f0e9c997624baa73 Mon Sep 17 00:00:00 2001 From: gretzky Date: Thu, 31 Jan 2019 10:20:44 -0500 Subject: [PATCH 4/6] [styled-system] increment version number --- types/styled-system/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/styled-system/index.d.ts b/types/styled-system/index.d.ts index e2cdd2cddf..0efa5212fc 100644 --- a/types/styled-system/index.d.ts +++ b/types/styled-system/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for styled-system 3.1 +// Type definitions for styled-system 3.2 // Project: https://github.com/jxnblk/styled-system#readme // Definitions by: Marshall Bowers // Ben McCormick From e45966b1eaa2d63538a0de555d01709328008d1e Mon Sep 17 00:00:00 2001 From: gretzky Date: Thu, 31 Jan 2019 16:16:09 -0500 Subject: [PATCH 5/6] lint --- types/styled-system/index.d.ts | 396 ++++++++++++++++----------------- 1 file changed, 198 insertions(+), 198 deletions(-) diff --git a/types/styled-system/index.d.ts b/types/styled-system/index.d.ts index 0efa5212fc..eb2609cb8e 100644 --- a/types/styled-system/index.d.ts +++ b/types/styled-system/index.d.ts @@ -13,41 +13,41 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 -import * as CSS from 'csstype' +import * as CSS from "csstype"; -export const defaultBreakpoints: string[] -export function is(n: any): boolean -export function num(n: any): boolean -export function px(n: any): string +export const defaultBreakpoints: string[]; +export function is(n: any): boolean; +export function num(n: any): boolean; +export function px(n: any): string; -export function get(obj: any, ...paths: Array): any +export function get(obj: any, ...paths: Array): any; -export function themeGet(keys: string, fallback?: string): any -export function cloneFunc(fn: (...args: any[]) => any): (...args: any[]) => any +export function themeGet(keys: string, fallback?: string): any; +export function cloneFunc(fn: (...args: any[]) => any): (...args: any[]) => any; -export function merge(a: any, b: any): any +export function merge(a: any, b: any): any; export function compose( ...funcs: Array<(...args: any[]) => any> -): (...args: any[]) => any +): (...args: any[]) => any; -export function createMediaQuery(n: number | string): string +export function createMediaQuery(n: number | string): string; export interface LowLevelStylefunctionArguments { - prop: string - cssProperty?: string - key?: string - getter?: () => any - transformValue?: (n: string | number) => any - scale?: Array + prop: string; + cssProperty?: string; + key?: string; + getter?: () => any; + transformValue?: (n: string | number) => any; + scale?: Array; } export function style( args: LowLevelStylefunctionArguments -): { [cssProp: string]: string } +): { [cssProp: string]: string }; -export type TLengthStyledSystem = string | 0 | number -export type ResponsiveValue = T | Array | { [key: string]: T } +export type TLengthStyledSystem = string | 0 | number; +export type ResponsiveValue = T | Array | { [key: string]: T }; /** * Converts shorthand margin and padding props to margin and padding CSS declarations @@ -61,71 +61,71 @@ export type ResponsiveValue = T | Array | { [key: string]: T } export interface SpaceProps { /** Margin on top, left, bottom and right */ - m?: ResponsiveValue> + m?: ResponsiveValue>; /** Margin for the top */ - mt?: ResponsiveValue> + mt?: ResponsiveValue>; /** Margin for the right */ - mr?: ResponsiveValue> + mr?: ResponsiveValue>; /** Margin for the bottom */ - mb?: ResponsiveValue> + mb?: ResponsiveValue>; /** Margin for the left */ - ml?: ResponsiveValue> + ml?: ResponsiveValue>; /** Margin for the left and right */ - mx?: ResponsiveValue> + mx?: ResponsiveValue>; /** Margin for the top and bottom */ - my?: ResponsiveValue> + my?: ResponsiveValue>; /** Padding on top, left, bottom and right */ - p?: ResponsiveValue> + p?: ResponsiveValue>; /** Padding for the top */ - pt?: ResponsiveValue> + pt?: ResponsiveValue>; /** Padding for the right */ - pr?: ResponsiveValue> + pr?: ResponsiveValue>; /** Padding for the bottom */ - pb?: ResponsiveValue> + pb?: ResponsiveValue>; /** Padding for the left */ - pl?: ResponsiveValue> + pl?: ResponsiveValue>; /** Padding for the left and right */ - px?: ResponsiveValue> + px?: ResponsiveValue>; /** Padding for the top and bottom */ - py?: ResponsiveValue> + py?: ResponsiveValue>; } -export function space(...args: any[]): any +export function space(...args: any[]): any; export interface VariantArgs { - key?: string + key?: string; // Defaults to "variant" - prop?: string + prop?: string; } -export function variant(props: VariantArgs): (...args: any[]) => any +export function variant(props: VariantArgs): (...args: any[]) => any; -export type ObjectOrArray = T[] | { [K: string]: T } +export type ObjectOrArray = T[] | { [K: string]: T }; export interface BaseTheme { - breakpoints?: string[] | number[] | Object - colors?: ObjectOrArray - fontSizes?: number[] - space?: number[] + breakpoints?: string[] | number[] | Object; + colors?: ObjectOrArray; + fontSizes?: number[]; + space?: number[]; } export interface Theme extends BaseTheme { - borders?: ObjectOrArray> - buttons?: ObjectOrArray - colorStyles?: ObjectOrArray - fontWeights?: ObjectOrArray - fonts?: ObjectOrArray - heights?: ObjectOrArray> - letterSpacings?: ObjectOrArray> - lineHeights?: ObjectOrArray> - maxHeights?: ObjectOrArray> - maxWidths?: ObjectOrArray> - minHeights?: ObjectOrArray> - minWidths?: ObjectOrArray> - opacity?: ObjectOrArray - radii?: ObjectOrArray> - shadows?: ObjectOrArray - textStyles?: ObjectOrArray + borders?: ObjectOrArray>; + buttons?: ObjectOrArray; + colorStyles?: ObjectOrArray; + fontWeights?: ObjectOrArray; + fonts?: ObjectOrArray; + heights?: ObjectOrArray>; + letterSpacings?: ObjectOrArray>; + lineHeights?: ObjectOrArray>; + maxHeights?: ObjectOrArray>; + maxWidths?: ObjectOrArray>; + minHeights?: ObjectOrArray>; + minWidths?: ObjectOrArray>; + opacity?: ObjectOrArray; + radii?: ObjectOrArray>; + shadows?: ObjectOrArray; + textStyles?: ObjectOrArray; } /** @@ -142,10 +142,10 @@ export interface FontSizeProps { * - And array values are converted into responsive values. * */ - fontSize?: ResponsiveValue> + fontSize?: ResponsiveValue>; } -export function fontSize(...args: any[]): any +export function fontSize(...args: any[]): any; /** * Color @@ -161,10 +161,10 @@ export interface TextColorProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/color) */ - color?: ResponsiveValue + color?: ResponsiveValue; } -export function textColor(...args: any[]): any +export function textColor(...args: any[]): any; export interface BgColorProps { /** @@ -176,22 +176,22 @@ export interface BgColorProps { * * [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/background-color) */ - bg?: ResponsiveValue> + bg?: ResponsiveValue>; } -export function bgColor(...args: any[]): any +export function bgColor(...args: any[]): any; export interface ColorProps extends TextColorProps, BgColorProps {} -export function color(...args: any[]): any +export function color(...args: any[]): any; /** * Typography */ export interface FontFamilyProps { - fontFamily?: ResponsiveValue + fontFamily?: ResponsiveValue; } -export function fontFamily(...args: any[]): any +export function fontFamily(...args: any[]): any; export interface TextAlignProps { /** @@ -199,10 +199,10 @@ export interface TextAlignProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align) */ - textAlign?: ResponsiveValue + textAlign?: ResponsiveValue; } -export function textAlign(...args: any[]): any +export function textAlign(...args: any[]): any; export interface LineHeightProps { /** @@ -213,9 +213,9 @@ export interface LineHeightProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/line-height) */ - lineHeight?: ResponsiveValue> + lineHeight?: ResponsiveValue>; } -export function lineHeight(...args: any[]): any +export function lineHeight(...args: any[]): any; export interface FontWeightProps { /** @@ -225,10 +225,10 @@ export interface FontWeightProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight) */ - fontWeight?: ResponsiveValue + fontWeight?: ResponsiveValue; } -export function fontWeight(...args: any[]): any +export function fontWeight(...args: any[]): any; export interface FontStyleProps { /** @@ -237,9 +237,9 @@ export interface FontStyleProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/font-style) */ - fontStyle?: ResponsiveValue + fontStyle?: ResponsiveValue; } -export function fontStyle(...args: any[]): any +export function fontStyle(...args: any[]): any; export interface LetterSpacingProps { /** @@ -247,9 +247,9 @@ export interface LetterSpacingProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/letter-spacing) */ - letterSpacing?: ResponsiveValue> + letterSpacing?: ResponsiveValue>; } -export function letterSpacing(...args: any[]): any +export function letterSpacing(...args: any[]): any; /** * Layout @@ -263,10 +263,10 @@ export interface DisplayProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/display) */ - display?: ResponsiveValue + display?: ResponsiveValue; } -export function display(...args: any[]): any +export function display(...args: any[]): any; export interface MaxWidthProps { /** @@ -275,10 +275,10 @@ export interface MaxWidthProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/max-width) */ - maxWidth?: ResponsiveValue> + maxWidth?: ResponsiveValue>; } -export function maxWidth(...args: any[]): any +export function maxWidth(...args: any[]): any; export interface MinWidthProps { /** @@ -287,10 +287,10 @@ export interface MinWidthProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/min-width) */ - minWidth?: ResponsiveValue> + minWidth?: ResponsiveValue>; } -export function minWidth(...args: any[]): any +export function minWidth(...args: any[]): any; export interface WidthProps { /** @@ -301,10 +301,10 @@ export interface WidthProps { * - String values are passed as raw CSS values. * - And arrays are converted to responsive width styles. */ - width?: ResponsiveValue> + width?: ResponsiveValue>; } -export function width(...args: any[]): any +export function width(...args: any[]): any; export interface MaxHeightProps { /** @@ -313,10 +313,10 @@ export interface MaxHeightProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/max-height) */ - maxHeight?: ResponsiveValue> + maxHeight?: ResponsiveValue>; } -export function maxHeight(...args: any[]): any +export function maxHeight(...args: any[]): any; export interface MinHeightProps { /** @@ -325,10 +325,10 @@ export interface MinHeightProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/display) */ - minHeight?: ResponsiveValue> + minHeight?: ResponsiveValue>; } -export function minHeight(...args: any[]): any +export function minHeight(...args: any[]): any; export interface HeightProps { /** @@ -337,37 +337,37 @@ export interface HeightProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/height) */ - height?: ResponsiveValue> + height?: ResponsiveValue>; } -export function height(...args: any[]): any +export function height(...args: any[]): any; // TODO: Document, I couldn't find any info on these two properties... export interface SizeWidthProps { - size?: ResponsiveValue> + size?: ResponsiveValue>; } -export function sizeWidth(...args: any[]): any +export function sizeWidth(...args: any[]): any; export interface SizeHeightProps { - size?: ResponsiveValue> + size?: ResponsiveValue>; } -export function sizeHeight(...args: any[]): any +export function sizeHeight(...args: any[]): any; export interface SizeProps extends SizeHeightProps, SizeWidthProps {} -export function size(...args: any[]): any +export function size(...args: any[]): any; export interface RatioProps { /** * The ration is height: 0 & paddingBottom */ - ratio?: ResponsiveValue + ratio?: ResponsiveValue; } -export function ratio(...args: any[]): any +export function ratio(...args: any[]): any; export interface VerticalAlignProps { /** @@ -375,10 +375,10 @@ export interface VerticalAlignProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/vertical-align) */ - verticalAlign?: ResponsiveValue> + verticalAlign?: ResponsiveValue>; } -export function verticalAlign(...args: any[]): any +export function verticalAlign(...args: any[]): any; /** * Flexbox @@ -394,10 +394,10 @@ export interface AlignItemsProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/align-items) */ - alignItems?: ResponsiveValue + alignItems?: ResponsiveValue; } -export function alignItems(...args: any[]): any +export function alignItems(...args: any[]): any; export interface AlignContentProps { /** @@ -406,10 +406,10 @@ export interface AlignContentProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/align-content) */ - alignContent?: ResponsiveValue + alignContent?: ResponsiveValue; } -export function alignContent(...args: any[]): any +export function alignContent(...args: any[]): any; export interface JustifyItemsProps { /** @@ -418,7 +418,7 @@ export interface JustifyItemsProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/justify-items) */ - justifyItems?: ResponsiveValue + justifyItems?: ResponsiveValue; } export interface JustifyContentProps { @@ -428,10 +428,10 @@ export interface JustifyContentProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content) */ - justifyContent?: ResponsiveValue + justifyContent?: ResponsiveValue; } -export function justifyContent(...args: any[]): any +export function justifyContent(...args: any[]): any; export interface FlexWrapProps { /** @@ -440,20 +440,20 @@ export interface FlexWrapProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap) */ - flexWrap?: ResponsiveValue + flexWrap?: ResponsiveValue; } -export function flexWrap(...args: any[]): any +export function flexWrap(...args: any[]): any; export interface FlexBasisProps { // TODO: The FlexBasisValue currently really only exists for documentation // purposes, because flex-basis also accepts `Nem` and `Npx` strings. // Not sure there’s a way to still have the union values show up as // auto-completion results. - flexBasis?: ResponsiveValue> + flexBasis?: ResponsiveValue>; } -export function flexBasis(...args: any[]): any +export function flexBasis(...args: any[]): any; export interface FlexDirectionProps { /** @@ -462,10 +462,10 @@ export interface FlexDirectionProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction) */ - flexDirection?: ResponsiveValue + flexDirection?: ResponsiveValue; } -export function flexDirection(...args: any[]): any +export function flexDirection(...args: any[]): any; export interface FlexProps { /** @@ -474,10 +474,10 @@ export interface FlexProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/flex) */ - flex?: ResponsiveValue> + flex?: ResponsiveValue>; } -export function flex(...args: any[]): any +export function flex(...args: any[]): any; export interface JustifySelfProps { /** @@ -486,10 +486,10 @@ export interface JustifySelfProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/justify-self) */ - justifySelf?: ResponsiveValue + justifySelf?: ResponsiveValue; } -export function justifySelf(...args: any[]): any +export function justifySelf(...args: any[]): any; export interface AlignSelfProps { /** @@ -500,10 +500,10 @@ export interface AlignSelfProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/align-self) */ - alignSelf?: ResponsiveValue + alignSelf?: ResponsiveValue; } -export function alignSelf(...args: any[]): any +export function alignSelf(...args: any[]): any; export interface OrderProps { /** @@ -512,10 +512,10 @@ export interface OrderProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/order) */ - order?: ResponsiveValue + order?: ResponsiveValue; } -export function order(...args: any[]): any +export function order(...args: any[]): any; /** * Grid Layout @@ -530,10 +530,10 @@ export interface GridGapProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/gap) */ - gridGap?: ResponsiveValue> + gridGap?: ResponsiveValue>; } -export function gridGap(...args: any[]): any +export function gridGap(...args: any[]): any; export interface GridColumnGapProps { /** @@ -543,10 +543,10 @@ export interface GridColumnGapProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/column-gap) */ - gridColumnGap?: ResponsiveValue> + gridColumnGap?: ResponsiveValue>; } -export function gridColumnGap(...args: any[]): any +export function gridColumnGap(...args: any[]): any; export interface GridRowGapProps { /** @@ -556,10 +556,10 @@ export interface GridRowGapProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/row-gap) */ - gridRowGap?: ResponsiveValue> + gridRowGap?: ResponsiveValue>; } -export function gridRowGap(...args: any[]): any +export function gridRowGap(...args: any[]): any; export interface GridColumnProps { /** @@ -569,10 +569,10 @@ export interface GridColumnProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column) */ - gridColumn?: ResponsiveValue + gridColumn?: ResponsiveValue; } -export function gridColumn(...args: any[]): any +export function gridColumn(...args: any[]): any; export interface GridRowProps { /** @@ -582,10 +582,10 @@ export interface GridRowProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row) */ - gridRow?: ResponsiveValue + gridRow?: ResponsiveValue; } -export function gridRow(...args: any[]): any +export function gridRow(...args: any[]): any; export interface GridAutoFlowProps { /** @@ -594,10 +594,10 @@ export interface GridAutoFlowProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-flow) */ - gridAutoFlow?: ResponsiveValue + gridAutoFlow?: ResponsiveValue; } -export function gridAutoFlow(...args: any[]): any +export function gridAutoFlow(...args: any[]): any; export interface GridAutoColumnsProps { /** @@ -605,10 +605,10 @@ export interface GridAutoColumnsProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-columns) */ - gridAutoColumns?: ResponsiveValue> + gridAutoColumns?: ResponsiveValue>; } -export function gridAutoColumns(...args: any[]): any +export function gridAutoColumns(...args: any[]): any; export interface GridAutoRowsProps { /** @@ -616,10 +616,10 @@ export interface GridAutoRowsProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-rows) */ - gridAutoRows?: ResponsiveValue> + gridAutoRows?: ResponsiveValue>; } -export function gridAutoRows(...args: any[]): any +export function gridAutoRows(...args: any[]): any; export interface GridTemplatesColumnsProps { /** @@ -629,10 +629,10 @@ export interface GridTemplatesColumnsProps { */ gridTemplateColumns?: ResponsiveValue< CSS.GridTemplateColumnsProperty - > + >; } -export function gridTemplateColumns(...args: any[]): any +export function gridTemplateColumns(...args: any[]): any; export interface GridTemplatesRowsProps { /** @@ -640,10 +640,10 @@ export interface GridTemplatesRowsProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/row-template-rows) */ - gridTemplateRows?: ResponsiveValue> + gridTemplateRows?: ResponsiveValue>; } -export function gridTemplateRows(...args: any[]): any +export function gridTemplateRows(...args: any[]): any; export interface GridTemplatesAreasProps { /** @@ -651,10 +651,10 @@ export interface GridTemplatesAreasProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-areas) */ - gridTemplateAreas?: ResponsiveValue + gridTemplateAreas?: ResponsiveValue; } -export function gridTemplateAreas(...args: any[]): any +export function gridTemplateAreas(...args: any[]): any; export interface GridAreaProps { /** @@ -664,10 +664,10 @@ export interface GridAreaProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-area) */ - gridArea?: ResponsiveValue + gridArea?: ResponsiveValue; } -export function gridArea(...args: any[]): any +export function gridArea(...args: any[]): any; /** * Borders @@ -680,10 +680,10 @@ export interface BorderProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border) */ - border?: ResponsiveValue> + border?: ResponsiveValue>; } -export function border(...args: any[]): any +export function border(...args: any[]): any; export interface BorderTopProps { /** @@ -692,10 +692,10 @@ export interface BorderTopProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-top) */ - borderTop?: ResponsiveValue> + borderTop?: ResponsiveValue>; } -export function borderTop(...args: any[]): any +export function borderTop(...args: any[]): any; export interface BorderRightProps { /** @@ -704,10 +704,10 @@ export interface BorderRightProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-right) */ - borderRight?: ResponsiveValue> + borderRight?: ResponsiveValue>; } -export function borderRight(...args: any[]): any +export function borderRight(...args: any[]): any; export interface BorderBottomProps { /** @@ -716,10 +716,10 @@ export interface BorderBottomProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom) */ - borderBottom?: ResponsiveValue> + borderBottom?: ResponsiveValue>; } -export function borderBottom(...args: any[]): any +export function borderBottom(...args: any[]): any; export interface BorderLeftProps { /** @@ -728,10 +728,10 @@ export interface BorderLeftProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-left) */ - borderLeft?: ResponsiveValue> + borderLeft?: ResponsiveValue>; } -export function borderLeft(...args: any[]): any +export function borderLeft(...args: any[]): any; export interface BordersProps extends BorderTopProps, @@ -739,7 +739,7 @@ export interface BordersProps BorderBottomProps, BorderLeftProps {} -export function borders(...args: any[]): any +export function borders(...args: any[]): any; export interface BorderColorProps { /** @@ -747,10 +747,10 @@ export interface BorderColorProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-color) */ - borderColor?: ResponsiveValue + borderColor?: ResponsiveValue; } -export function borderColor(...args: any[]): any +export function borderColor(...args: any[]): any; export interface BorderRadiusProps { /** @@ -759,10 +759,10 @@ export interface BorderRadiusProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius) */ - borderRadius?: ResponsiveValue> + borderRadius?: ResponsiveValue>; } -export function borderRadius(...args: any[]): any +export function borderRadius(...args: any[]): any; export interface BoxShadowProps { /** @@ -772,10 +772,10 @@ export interface BoxShadowProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow) */ - boxShadow?: ResponsiveValue + boxShadow?: ResponsiveValue; } -export function boxShadow(...arg: any[]): any +export function boxShadow(...arg: any[]): any; export interface OpacityProps { /** @@ -784,10 +784,10 @@ export interface OpacityProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/opacity) */ - opacity?: ResponsiveValue + opacity?: ResponsiveValue; } -export function opacity(...arg: any[]): any +export function opacity(...arg: any[]): any; export interface OverflowProps { /** @@ -796,10 +796,10 @@ export interface OverflowProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/overflow) */ - overflow?: ResponsiveValue + overflow?: ResponsiveValue; } -export function overflow(...arg: any[]): any +export function overflow(...arg: any[]): any; /** * Background */ @@ -811,10 +811,10 @@ export interface BackgroundProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/background) */ - background?: ResponsiveValue> + background?: ResponsiveValue>; } -export function background(...args: any[]): any +export function background(...args: any[]): any; export interface BackgroundImageProps { /** @@ -822,10 +822,10 @@ export interface BackgroundImageProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/background-image) */ - backgroundImage?: ResponsiveValue + backgroundImage?: ResponsiveValue; } -export function backgroundImage(...args: any[]): any +export function backgroundImage(...args: any[]): any; export interface BackgroundSizeProps { /** @@ -834,10 +834,10 @@ export interface BackgroundSizeProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size) */ - backgroundSize?: ResponsiveValue> + backgroundSize?: ResponsiveValue>; } -export function backgroundSize(...args: any[]): any +export function backgroundSize(...args: any[]): any; export interface BackgroundPositionProps { /** @@ -848,10 +848,10 @@ export interface BackgroundPositionProps { */ backgroundPosition?: ResponsiveValue< CSS.BackgroundPositionProperty - > + >; } -export function backgroundPosition(...args: any[]): any +export function backgroundPosition(...args: any[]): any; export interface BackgroundRepeatProps { /** @@ -860,10 +860,10 @@ export interface BackgroundRepeatProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/background-repeat) */ - backgroundRepeat?: ResponsiveValue + backgroundRepeat?: ResponsiveValue; } -export function backgroundRepeat(...args: any[]): any +export function backgroundRepeat(...args: any[]): any; /** * Position @@ -876,10 +876,10 @@ export interface PositionProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/position) */ - position?: ResponsiveValue + position?: ResponsiveValue; } -export function position(...args: any[]): any +export function position(...args: any[]): any; export interface ZIndexProps { /** @@ -888,10 +888,10 @@ export interface ZIndexProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/z-index) */ - zIndex?: ResponsiveValue + zIndex?: ResponsiveValue; } -export function zIndex(...args: any[]): any +export function zIndex(...args: any[]): any; export interface TopProps { /** @@ -900,10 +900,10 @@ export interface TopProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/top) */ - top?: ResponsiveValue> + top?: ResponsiveValue>; } -export function top(...args: any[]): any +export function top(...args: any[]): any; export interface RightProps { /** @@ -912,10 +912,10 @@ export interface RightProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/right) */ - right?: ResponsiveValue> + right?: ResponsiveValue>; } -export function right(...args: any[]): any +export function right(...args: any[]): any; export interface BottomProps { /** @@ -924,10 +924,10 @@ export interface BottomProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/top) */ - bottom?: ResponsiveValue> + bottom?: ResponsiveValue>; } -export function bottom(...args: any[]): any +export function bottom(...args: any[]): any; export interface LeftProps { /** @@ -936,33 +936,33 @@ export interface LeftProps { * * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/left) */ - left?: ResponsiveValue> + left?: ResponsiveValue>; } -export function left(...args: any[]): any +export function left(...args: any[]): any; export interface TextStyleProps { - textStyle?: ResponsiveValue + textStyle?: ResponsiveValue; } -export function textStyle(...args: any[]): any +export function textStyle(...args: any[]): any; export interface ColorStyleProps { - colors?: ResponsiveValue + colors?: ResponsiveValue; } -export function colorStyle(...args: any[]): any +export function colorStyle(...args: any[]): any; export interface ButtonStyleProps { - variant?: ResponsiveValue + variant?: ResponsiveValue; } -export function buttonStyle(...args: any[]): any +export function buttonStyle(...args: any[]): any; export interface MixedProps { - key?: any + key?: any; // Defaults to "variant" - prop?: string + prop?: string; } -export function mixed(...args: any[]): any +export function mixed(...args: any[]): any; From b2df2fbf94f9f208b21191e53c7221e8072de1ca Mon Sep 17 00:00:00 2001 From: gretzky Date: Thu, 31 Jan 2019 16:21:29 -0500 Subject: [PATCH 6/6] fix tslint violation --- types/styled-system/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/styled-system/index.d.ts b/types/styled-system/index.d.ts index eb2609cb8e..19b9afcd5f 100644 --- a/types/styled-system/index.d.ts +++ b/types/styled-system/index.d.ts @@ -103,7 +103,7 @@ export function variant(props: VariantArgs): (...args: any[]) => any; export type ObjectOrArray = T[] | { [K: string]: T }; export interface BaseTheme { - breakpoints?: string[] | number[] | Object; + breakpoints?: string[] | number[] | object; colors?: ObjectOrArray; fontSizes?: number[]; space?: number[];