Created
November 1, 2017 23:42
-
-
Save zgotsch/d64e8e477f42febd3f67596628d04ed4 to your computer and use it in GitHub Desktop.
Aphrodite Flow Types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// flow-typed signature: 20156f0acaa7b756a5b17b397b8b8220 | |
// flow-typed version: <<STUB>>/aphrodite_v1.2.x/flow_v0.56.0 | |
declare module "aphrodite" { | |
declare type SheetDefinition = {[id: string]: any}; | |
declare opaque type SheetEntry; | |
// declare export type AphroditeExtension = { | |
// selectorHandler: SelectorHandler | |
// }; | |
// A type-level function that describes stylesheet creation | |
declare type CreateStylesheet = <T: SheetDefinition>(T) => SheetEntry; | |
declare export class StyleSheet { | |
static create<T: {[name: string]: SheetDefinition}>( | |
sheet: T | |
): $ObjMap<T, CreateStylesheet>; | |
// TODO(zach): static extend() | |
} | |
declare type MaybeSheetEntry = SheetEntry | false | null | void; | |
declare export function css(...definitions: Array<MaybeSheetEntry>): string; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment