pre-installations and preparations
This commit is contained in:
1 parent
3e5a0329cb
commit
201d621ac3
6977 files changed
+742826
No files matched your search
+2
@@ -0,0 +1,2 @@
|
||||
export * from '../types'
|
||||
export { default } from '../types'
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
// Definitions by: Junyoung Clare Jang <https://github.com/Ailrun>
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
import { RegisteredCache, SerializedStyles } from '@emotion/utils'
|
||||
import * as CSS from 'csstype'
|
||||
|
||||
export { RegisteredCache, SerializedStyles }
|
||||
|
||||
export type CSSProperties = CSS.PropertiesFallback<number | string>
|
||||
export type CSSPropertiesWithMultiValues = {
|
||||
[K in keyof CSSProperties]:
|
||||
| CSSProperties[K]
|
||||
| ReadonlyArray<Extract<CSSProperties[K], string>>
|
||||
}
|
||||
|
||||
export type CSSPseudos = { [K in CSS.Pseudos]?: CSSObject }
|
||||
|
||||
export interface ArrayCSSInterpolation
|
||||
extends ReadonlyArray<CSSInterpolation> {}
|
||||
|
||||
export type InterpolationPrimitive =
|
||||
| null
|
||||
| undefined
|
||||
| boolean
|
||||
| number
|
||||
| string
|
||||
| ComponentSelector
|
||||
| Keyframes
|
||||
| SerializedStyles
|
||||
| CSSObject
|
||||
|
||||
export type CSSInterpolation = InterpolationPrimitive | ArrayCSSInterpolation
|
||||
|
||||
export interface CSSOthersObject {
|
||||
[propertiesName: string]: CSSInterpolation
|
||||
}
|
||||
|
||||
export interface CSSObject
|
||||
extends CSSPropertiesWithMultiValues,
|
||||
CSSPseudos,
|
||||
CSSOthersObject {}
|
||||
|
||||
export interface ComponentSelector {
|
||||
__emotion_styles: any
|
||||
}
|
||||
|
||||
export type Keyframes = {
|
||||
name: string
|
||||
styles: string
|
||||
anim: number
|
||||
toString: () => string
|
||||
} & string
|
||||
|
||||
export interface ArrayInterpolation<Props>
|
||||
extends ReadonlyArray<Interpolation<Props>> {}
|
||||
|
||||
export interface FunctionInterpolation<Props> {
|
||||
(props: Props): Interpolation<Props>
|
||||
}
|
||||
|
||||
export type Interpolation<Props> =
|
||||
| InterpolationPrimitive
|
||||
| ArrayInterpolation<Props>
|
||||
| FunctionInterpolation<Props>
|
||||
|
||||
export function serializeStyles<Props>(
|
||||
args: Array<TemplateStringsArray | Interpolation<Props>>,
|
||||
registered?: RegisteredCache,
|
||||
props?: Props
|
||||
): SerializedStyles
|
||||
Reference in new issue
Block a user