DefinitelyTyped/types/rtlcss/rtlcss-tests.ts
Natalie Weizenbaum b6d034a729
Add a type for RTLCSS's default plugin export (#45682)
This is written to match the structure of the autoprefixer types.
2020-06-24 07:13:55 -04:00

31 lines
673 B
TypeScript

import * as rtlcss from "rtlcss";
import { Transformer } from 'postcss';
rtlcss.process("body { direction:ltr; }");
const config = {
autoRename: false,
autoRenameStrict: false,
blacklist: {},
clean: true,
greedy: false,
processUrls: false,
stringMap: [
{
name : 'left-right',
priority: 100,
search : ['left', 'Left', 'LEFT'],
replace : ['right', 'Right', 'RIGHT'],
options : {
scope : '*',
ignoreCase : false
}
}
],
useCalc: false
};
rtlcss.configure(config);
const transformer: Transformer = rtlcss(config);