mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Added definition for inline-css
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
/// <reference path="inline-css.d.ts" />
|
||||
|
||||
import inlineCss = require('inline-css');
|
||||
|
||||
var str: string;
|
||||
var bool: boolean;
|
||||
|
||||
var options:inlineCss.Options;
|
||||
|
||||
str = options.url;
|
||||
str = options.extraCss;
|
||||
|
||||
bool = options.applyStyleTags;
|
||||
bool = options.applyLinkTags;
|
||||
bool = options.removeStyleTags;
|
||||
bool = options.removeLinkTags;
|
||||
bool = options.preserveMediaQueries;
|
||||
bool = options.applyWidthAttributes;
|
||||
bool = options.applyTableAttributes;
|
||||
|
||||
options = {
|
||||
url: str,
|
||||
extraCss: str,
|
||||
applyStyleTags: bool,
|
||||
applyLinkTags: bool,
|
||||
removeStyleTags: bool,
|
||||
removeLinkTags: bool,
|
||||
preserveMediaQueries: bool,
|
||||
applyWidthAttributes: bool,
|
||||
applyTableAttributes: bool
|
||||
};
|
||||
|
||||
inlineCss(str, options).then((value:string) => {
|
||||
|
||||
});
|
||||
Vendored
+28
@@ -0,0 +1,28 @@
|
||||
// Type definitions for inline-css
|
||||
// Project: https://github.com/jonkemp/inline-css
|
||||
// Definitions by: Philip Spain <https://github.com/philipisapain>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../bluebird/bluebird.d.ts" />
|
||||
|
||||
declare module 'inline-css' {
|
||||
import Promise = require('bluebird');
|
||||
|
||||
module InlineCss {
|
||||
export interface Options {
|
||||
url:string;
|
||||
extraCss?:string;
|
||||
applyStyleTags?:boolean;
|
||||
applyLinkTags?:boolean;
|
||||
removeStyleTags?:boolean;
|
||||
removeLinkTags?:boolean;
|
||||
preserveMediaQueries?:boolean;
|
||||
applyWidthAttributes?:boolean;
|
||||
applyTableAttributes?:boolean;
|
||||
}
|
||||
}
|
||||
|
||||
function InlineCss(html:string, options:InlineCss.Options):Promise<string>;
|
||||
|
||||
export = InlineCss;
|
||||
}
|
||||
Reference in New Issue
Block a user