Skip to content

Commit

Permalink
update types
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathantneal committed Aug 5, 2021
1 parent 3f2e42c commit 36cba61
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions packages/core/types/create-stitches.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type * as CSSUtil from './css-util'
import type * as Default from './default'
import type Sheet from './sheet'
import type Stitches from './stitches'

/* Interfaces */
/* ========================================================================== */
Expand Down Expand Up @@ -86,7 +86,7 @@ type CreateStitches = {
themeMap?: ThemeMap
utils?: Utils
}
): Sheet<
): Stitches<
// post-process prefix
string extends Prefix ? Default.Prefix : Prefix,
// post-process media
Expand Down
12 changes: 6 additions & 6 deletions packages/core/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import type CreateStitches from './create-stitches'
import type Sheet from './sheet'
import type Stitches from './stitches'

import type * as CSSUtil from './css-util'
import type * as Default from './default'
import type * as StyledComponent from './styled-component'

export type { CreateStitches, Sheet }
export type { CreateStitches, Stitches }

export type DefaultThemeMap = Default.ThemeMap

Expand Down Expand Up @@ -45,13 +45,13 @@ export declare const defaultThemeMap: DefaultThemeMap
export declare const createStitches: CreateStitches

/** Returns an object representing a theme. */
export declare const createTheme: Sheet['createTheme']
export declare const createTheme: Stitches['createTheme']

/** Returns a function that applies globalCss styles. */
export declare const globalCss: Sheet['globalCss']
export declare const globalCss: Stitches['globalCss']

/** Returns an object that applies `@keyframes` styles. */
export declare const keyframes: Sheet['keyframes']
export declare const keyframes: Stitches['keyframes']

/** Returns a function that applies styles and variants for a specific class. */
export declare const css: Sheet['css']
export declare const css: Stitches['css']
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import type * as StyledComponent from './styled-component'
import type * as ThemeUtil from './theme'
import type * as Util from './util'

/** Sheet interface. */
export default interface Sheet<
/** Stitches interface. */
export default interface Stitches<
Prefix extends string = Default.Prefix,
Media = Default.Media,
Theme = {},
Expand Down
4 changes: 2 additions & 2 deletions packages/react/types/create-stitches.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type * as CSSUtil from './css-util'
import type * as Default from './default'
import type Sheet from './sheet'
import type Stitches from './stitches'

/* Interfaces */
/* ========================================================================== */
Expand Down Expand Up @@ -86,7 +86,7 @@ type CreateStitches = {
themeMap?: ThemeMap
utils?: Utils
}
): Sheet<
): Stitches<
// post-process prefix
string extends Prefix ? Default.Prefix : Prefix,
// post-process media
Expand Down
14 changes: 7 additions & 7 deletions packages/react/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import type CreateStitches from './create-stitches'
import type Sheet from './sheet'
import type Stitches from './stitches'

import type * as CSSUtil from './css-util'
import type * as Default from './default'
import type * as StyledComponent from './styled-component'

export type { CreateStitches, Sheet }
export type { CreateStitches, Stitches }

export type CSSProperties = CSSUtil.CSSProperties
export type DefaultThemeMap = Default.ThemeMap
Expand Down Expand Up @@ -46,16 +46,16 @@ export declare const defaultThemeMap: DefaultThemeMap
export declare const createStitches: CreateStitches

/** Returns an object representing a theme. */
export declare const createTheme: Sheet['createTheme']
export declare const createTheme: Stitches['createTheme']

/** Returns a function that applies globalCss styles. */
export declare const globalCss: Sheet['globalCss']
export declare const globalCss: Stitches['globalCss']

/** Returns an object that applies `@keyframes` styles. */
export declare const keyframes: Sheet['keyframes']
export declare const keyframes: Stitches['keyframes']

/** Returns a function that applies styles and variants for a specific class. */
export declare const css: Sheet['css']
export declare const css: Stitches['css']

/** Returns a function that applies styles and variants for a specific class. */
export declare const styled: Sheet['styled']
export declare const styled: Stitches['styled']
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import type * as StyledComponent from './styled-component'
import type * as ThemeUtil from './theme'
import type * as Util from './util'

/** Sheet interface. */
export default interface Sheet<
/** Stitches interface. */
export default interface Stitches<
Prefix extends string = Default.Prefix,
Media = Default.Media,
Theme = {},
Expand Down

0 comments on commit 36cba61

Please sign in to comment.