DefinitelyTyped/types/insert-css/index.d.ts
Heye 1935ac55bc Add type definitions for insert-css (#31263)
* Add type definitions for insert-css

* Correct indentation in insert-css-tests.ts

* Make createElement calls consistent

* Use single quotes in import
2018-12-17 15:06:50 -08:00

19 lines
516 B
TypeScript

// Type definitions for insert-css 2.0
// Project: https://github.com/substack/insert-css
// Definitions by: Heye Vöcking <https://github.com/hvoecking>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export interface InsertCssOptions {
container?: HTMLElement;
prepend?: boolean;
}
export interface InsertCssStyleElement extends HTMLStyleElement {
styleSheet?: CSSStyleSheet;
}
export function insertCss(
css: string,
options?: InsertCssOptions,
): InsertCssStyleElement;