mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Adding autoprefixer-core
This is actually more useful than autoprefixer since this is the programmatic interface
This commit is contained in:
parent
d67c5e3e1a
commit
8bc91d57f6
9
autoprefixer-core/autoprefixer-core-tests.ts
Normal file
9
autoprefixer-core/autoprefixer-core-tests.ts
Normal file
@ -0,0 +1,9 @@
|
||||
/// <reference path="autoprefixer-core.d.ts" />
|
||||
import autoprefixer = require("autoprefixer-core");
|
||||
|
||||
var css: string;
|
||||
|
||||
var prefixed = autoprefixer.process(css).css;
|
||||
|
||||
var processor = autoprefixer({ browsers: ['> 1%', 'IE 7'], cascade: false });
|
||||
console.log(processor.info());
|
||||
44
autoprefixer-core/autoprefixer-core.d.ts
vendored
Normal file
44
autoprefixer-core/autoprefixer-core.d.ts
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
// Type definitions for Autoprefixer Core 5.1.11
|
||||
// Project: https://github.com/postcss/autoprefixer-core
|
||||
// Definitions by: Asana <https://asana.com>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module "autoprefixer-core" {
|
||||
interface Config {
|
||||
browsers?: string[];
|
||||
cascade?: boolean;
|
||||
remove?: boolean;
|
||||
}
|
||||
|
||||
interface Options {
|
||||
from?: string;
|
||||
to?: string;
|
||||
safe?: boolean;
|
||||
map?: {
|
||||
inline?: boolean;
|
||||
prev?: string | Object;
|
||||
}
|
||||
}
|
||||
|
||||
interface Result {
|
||||
css: string;
|
||||
map: string;
|
||||
opts: Options;
|
||||
}
|
||||
|
||||
interface Processor {
|
||||
postcss: any;
|
||||
info(): string;
|
||||
process(css: string, opts?: Options): Result;
|
||||
}
|
||||
|
||||
interface Exports {
|
||||
(config: Config): Processor;
|
||||
postcss: any;
|
||||
info(): string;
|
||||
process(css: string, opts?: Options): Result;
|
||||
}
|
||||
|
||||
var exports: Exports;
|
||||
export = exports;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user