Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/clean-css

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/clean-css - npm Package Compare versions

Comparing version 4.2.0 to 4.2.1

155

clean-css/index.d.ts

@@ -11,79 +11,74 @@ // Type definitions for clean-css 4.2

declare namespace CleanCSS {
/**
* Shared options passed when initializing a new instance of CleanCSS that returns either a promise or output
*/
interface OptionsBase {
/**
* Options passed when initializing a new instance of CleanCSS
* Controls compatibility mode used; defaults to ie10+ using `'*'`.
* Compatibility hash exposes the following properties: `colors`, `properties`, `selectors`, and `units`
*/
interface Options {
/**
* Controls compatibility mode used; defaults to ie10+ using `'*'`.
* Compatibility hash exposes the following properties: `colors`, `properties`, `selectors`, and `units`
*/
compatibility?: "*" | "ie9" | "ie8" | "ie7" | CompatibilityOptions;
compatibility?: "*" | "ie9" | "ie8" | "ie7" | CleanCSS.CompatibilityOptions;
/**
* Controls a function for handling remote requests; Defaults to the build in `loadRemoteResource` function
*/
fetch?: (uri: string, inlineRequest: HttpRequestOptions | HttpsRequestOptions, inlineTimeout: number, done: (message: string | number, body: string) => void) => void;
/**
* Controls a function for handling remote requests; Defaults to the build in `loadRemoteResource` function
*/
fetch?: (uri: string, inlineRequest: HttpRequestOptions | HttpsRequestOptions, inlineTimeout: number, done: (message: string | number, body: string) => void) => void;
/**
* Controls output CSS formatting; defaults to `false`.
* Format hash exposes the following properties: `breaks`, `breakWith`, `indentBy`, `indentWith`, `spaces`, and `wrapAt`.
*/
format?: "beautify" | "keep-breaks" | FormatOptions | false;
/**
* Controls output CSS formatting; defaults to `false`.
* Format hash exposes the following properties: `breaks`, `breakWith`, `indentBy`, `indentWith`, `spaces`, and `wrapAt`.
*/
format?: "beautify" | "keep-breaks" | CleanCSS.FormatOptions | false;
/**
* inline option whitelists which @import rules will be processed. Defaults to `'local'`
* Accepts the following values:
* 'local': enables local inlining;
* 'remote': enables remote inlining;
* 'none': disables all inlining;
* 'all': enables all inlining, same as ['local', 'remote'];
* '[uri]': enables remote inlining from the specified uri;
* '![url]': disables remote inlining from the specified uri;
*/
inline?: ReadonlyArray<string> | false;
/**
* inline option whitelists which @import rules will be processed. Defaults to `'local'`
* Accepts the following values:
* 'local': enables local inlining;
* 'remote': enables remote inlining;
* 'none': disables all inlining;
* 'all': enables all inlining, same as ['local', 'remote'];
* '[uri]': enables remote inlining from the specified uri;
* '![url]': disables remote inlining from the specified uri;
*/
inline?: ReadonlyArray<string> | false;
/**
* Controls extra options for inlining remote @import rules
*/
inlineRequest?: HttpRequestOptions | HttpsRequestOptions;
/**
* Controls extra options for inlining remote @import rules
*/
inlineRequest?: HttpRequestOptions | HttpsRequestOptions;
/**
* Controls number of milliseconds after which inlining a remote @import fails; defaults to `5000`;
*/
inlineTimeout?: number;
/**
* Controls number of milliseconds after which inlining a remote @import fails; defaults to `5000`;
*/
inlineTimeout?: number;
/**
* Controls optimization level used; defaults to `1`.
* Level hash exposes `1`, and `2`.
*/
level?: 0 | 1 | 2 | OptimizationsOptions;
/**
* Controls optimization level used; defaults to `1`.
* Level hash exposes `1`, and `2`.
*/
level?: 0 | 1 | 2 | CleanCSS.OptimizationsOptions;
/**
* Controls URL rebasing; defaults to `true`;
*/
rebase?: boolean;
/**
* Controls URL rebasing; defaults to `true`;
*/
rebase?: boolean;
/**
* controls a directory to which all URLs are rebased, most likely the directory under which the output file
* will live; defaults to the current directory;
*/
rebaseTo?: string;
/**
* controls a directory to which all URLs are rebased, most likely the directory under which the output file
* will live; defaults to the current directory;
*/
rebaseTo?: string;
/**
* If you prefer clean-css to return a Promise object then you need to explicitely ask for it; defaults to `false`
*/
returnPromise?: boolean;
/**
* Controls whether an output source map is built; defaults to `false`
*/
sourceMap?: boolean;
/**
* Controls whether an output source map is built; defaults to `false`
*/
sourceMap?: boolean;
/**
* Controls embedding sources inside a source map's `sourcesContent` field; defaults to `false`
*/
sourceMapInlineSources?: boolean;
}
/**
* Controls embedding sources inside a source map's `sourcesContent` field; defaults to `false`
*/
sourceMapInlineSources?: boolean;
}
declare namespace CleanCSS {
/**

@@ -655,7 +650,35 @@ * Output returned when calling minify functions

/**
* Options when returning a promise
*/
type OptionsPromise = OptionsBase & {
/**
* If you prefer clean-css to return a Promise object then you need to explicitly ask for it; defaults to `false`
*/
returnPromise: true
};
/**
* Options when returning an output
*/
type OptionsOutput = OptionsBase & {
/**
* If you prefer clean-css to return a Promise object then you need to explicitly ask for it; defaults to `false`
*/
returnPromise?: false
};
/**
* Discriminant union of both sets of options types. If you initialize without setting `returnPromise: true`
* and want to return a promise, you will need to cast to the correct options type so that TypeScript
* knows what the expected return type will be:
* `(options = options as CleanCSS.OptionsPromise).returnPromise = true`
*/
type Options = OptionsPromise | OptionsOutput;
/**
* Constructor interface for CleanCSS
*/
interface Constructor {
new(options: Options & { returnPromise: true }): MinifierPromise;
new(options?: Options): MinifierOutput;
new(options: OptionsPromise): MinifierPromise;
new(options?: OptionsOutput): MinifierOutput;
}

@@ -662,0 +685,0 @@ }

{
"name": "@types/clean-css",
"version": "4.2.0",
"version": "4.2.1",
"description": "TypeScript definitions for clean-css",

@@ -28,4 +28,4 @@ "license": "MIT",

},
"typesPublisherContentHash": "d5d12627e4b1b93a93db31832e5fb06dc0567b21c388f83a7bafcc9ebdd2a6fb",
"typesPublisherContentHash": "5f736e5cac9679580e74bf5b52692dc45d85fa0b9b6d153ae47ed4e8d6b55e59",
"typeScriptVersion": "2.0"
}

@@ -11,3 +11,3 @@ # Installation

Additional Details
* Last updated: Fri, 25 Jan 2019 00:14:39 GMT
* Last updated: Thu, 31 Jan 2019 01:45:39 GMT
* Dependencies: @types/node

@@ -14,0 +14,0 @@ * Global values: none

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc