mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
[postcss-calc] Add Typescript definitions.
This commit is contained in:
parent
f01ba112a9
commit
3d7a352af7
22
types/postcss-calc/index.d.ts
vendored
Normal file
22
types/postcss-calc/index.d.ts
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
// Type definitions for postcss-calc 7.0
|
||||
// Project: https://github.com/postcss/postcss-calc
|
||||
// Definitions by: Jeow Li Huan <https://github.com/huan086>
|
||||
// Definitions: https://github.com/huan086/postcss-plugins-typings
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
import { Plugin } from "postcss";
|
||||
|
||||
declare namespace calc {
|
||||
interface Options {
|
||||
precision?: number;
|
||||
preserve?: boolean;
|
||||
warnWhenCannotResolve?: boolean;
|
||||
mediaQueries?: boolean;
|
||||
selectors?: boolean;
|
||||
}
|
||||
|
||||
type Calc = Plugin<Options>;
|
||||
}
|
||||
|
||||
declare const calc: calc.Calc;
|
||||
export = calc;
|
||||
6
types/postcss-calc/package.json
Normal file
6
types/postcss-calc/package.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"postcss": "7.x.x"
|
||||
}
|
||||
}
|
||||
12
types/postcss-calc/postcss-calc-tests.ts
Normal file
12
types/postcss-calc/postcss-calc-tests.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import calc = require("postcss-calc");
|
||||
import { Transformer } from 'postcss';
|
||||
|
||||
const ap1: Transformer = calc();
|
||||
|
||||
const ap2: Transformer = calc({
|
||||
precision: 5,
|
||||
preserve: false,
|
||||
warnWhenCannotResolve: false,
|
||||
mediaQueries: false,
|
||||
selectors: false
|
||||
});
|
||||
23
types/postcss-calc/tsconfig.json
Normal file
23
types/postcss-calc/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"postcss-calc-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/postcss-calc/tslint.json
Normal file
1
types/postcss-calc/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user