diff --git a/inline-css/inline-css-tests.ts b/inline-css/inline-css-tests.ts new file mode 100644 index 000000000..e633e9e0a --- /dev/null +++ b/inline-css/inline-css-tests.ts @@ -0,0 +1,35 @@ +/// + +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) => { + +}); diff --git a/inline-css/inline-css.d.ts b/inline-css/inline-css.d.ts new file mode 100644 index 000000000..c0cd640ac --- /dev/null +++ b/inline-css/inline-css.d.ts @@ -0,0 +1,28 @@ +// Type definitions for inline-css +// Project: https://github.com/jonkemp/inline-css +// Definitions by: Philip Spain +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +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; + + export = InlineCss; +}