DefinitelyTyped/types/facepaint/index.d.ts
Tim Swalling aea4f61be3 [@types/facepaint] update DynamicStyleFunction signature to return array (#38159)
* Update `DynamicStyleFunction` return to be array

* Add self to `Definitions by`
2019-09-10 22:21:08 -07:00

37 lines
965 B
TypeScript

// Type definitions for facepaint 1.2
// Project: https://github.com/emotion-js/facepaint
// Definitions by: Ciarán Curley <https://github.com/DogPawHat>
// Anton Samper Rivaya <https://github.com/antonsamper>
// Tim Swalling <https://github.com/timswalling>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
declare namespace facepaint {
type BaseArg = object | object[];
type Arg = BaseArg | BaseArg[];
type Selector = string;
interface DynamicStyle {
[key: string]: {
[key: string]: string | number;
};
}
interface DynamicStyleFunction {
(...args: Arg[]): DynamicStyle[];
}
interface Options {
literal?: boolean;
overlap?: boolean;
}
}
declare function facepaint(
breakpoints: facepaint.Selector[],
options?: facepaint.Options
): facepaint.DynamicStyleFunction;
export = facepaint;