postcss-nested: package provides own types (#44018)

as of version 4.2.1: https://github.com/postcss/postcss-nested/blob/master/CHANGELOG.md#421
This commit is contained in:
Avi Vahl
2020-04-27 18:13:46 +03:00
committed by GitHub
parent f35b837286
commit 821ae5b520
6 changed files with 6 additions and 76 deletions

View File

@@ -3648,6 +3648,12 @@
"sourceRepoURL": "https://github.com/sindresorhus/positive-zero",
"asOfVersion": "3.0.0"
},
{
"libraryName": "postcss-nested",
"typingsPackageName": "postcss-nested",
"sourceRepoURL": "https://github.com/postcss/postcss-nested",
"asOfVersion": "4.2.1"
},
{
"libraryName": "postmark",
"typingsPackageName": "postmark",

View File

@@ -1,34 +0,0 @@
// Type definitions for postcss-nested 4.1
// Project: https://github.com/postcss/postcss-nested#readme
// Definitions by: Maxim Vorontsov <https://github.com/VorontsovMaxim>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
import { Plugin } from 'postcss';
declare namespace nested {
interface Options {
/**
* By default, plugin will bubble only @media and @supports at-rules.
* You can add your custom at-rules to this list by this option.
*/
bubble?: string[];
/**
* By default, plugin will unwrap only @font-face, @keyframes and @document at-rules.
* You can add your custom at-rules to this list by this option.
*/
unwrap?: string[];
/**
* By default, plugin will strip out any empty selector generated by intermediate nesting
* levels. You can set this option to true to preserve them.
*/
preserveEmpty?: boolean;
}
type Nested = Plugin<Options>;
}
declare const nested: nested.Nested;
export = nested;

View File

@@ -1,6 +0,0 @@
{
"private": true,
"dependencies": {
"postcss": "7.x.x"
}
}

View File

@@ -1,12 +0,0 @@
import * as postcss from 'postcss';
import nested = require('postcss-nested');
const withDefaultOptions: postcss.Transformer = nested();
const withCustomOptions: postcss.Transformer = nested({
bubble: ['phone'],
unwrap: ['phone'],
preserveEmpty: true
});
postcss().use(withDefaultOptions);
postcss().use(withCustomOptions);

View File

@@ -1,23 +0,0 @@
{
"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-nested-tests.ts"
]
}

View File

@@ -1 +0,0 @@
{ "extends": "dtslint/dt.json" }