Skip to content

Instantly share code, notes, and snippets.

@HendrikRoth
Created November 3, 2016 11:20
Show Gist options
  • Save HendrikRoth/e06efa0c1ac6b7c6407ba9b541591314 to your computer and use it in GitHub Desktop.
Save HendrikRoth/e06efa0c1ac6b7c6407ba9b541591314 to your computer and use it in GitHub Desktop.
declare namespace CssObj {
interface Options {
local?: boolean | LocalOption;
cssom?: cssomOption;
plugins?: any[];
}
interface cssomOption {
frame?: any,
prefixes?: string[],
name?: string,
attrs?: Object,
noMedia?: boolean
}
interface LocalOption {
prefix?: string;
localNames?: Object;
}
interface HTMLStyleElement {
id?: string;
className?: string;
sheet?: Object;
styleSheet?: Object;
media?: string;
}
interface Node {
children: Object;
diff?: Object;
lastVal?: Object;
parentRule: any;
prevVal: any;
prop: Object;
}
interface Result {
update (data?: any): Result;
cssom: HTMLStyleElement;
data: Object;
nodes: Node[];
obj: Object;
options: Options;
ref: Object;
root: Node;
}
interface Static {
(obj: Object, options?: Options, data?: any): Result;
}
}
declare module 'cssobj' {
const cssobj: CssObj.Static
export = cssobj
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment