@types/node-sass
Advanced tools
Comparing version 4.11.0 to 4.11.1
@@ -19,13 +19,13 @@ // Type definitions for node-sass 4.11 | ||
export interface Context { | ||
options: Options; | ||
callback: SassRenderCallback | undefined; | ||
[data: string]: any; | ||
options: Options; | ||
callback: SassRenderCallback | undefined; | ||
[data: string]: any; | ||
} | ||
export interface AsyncContext extends Context { | ||
callback: SassRenderCallback; | ||
callback: SassRenderCallback; | ||
} | ||
export interface SyncContext extends Context { | ||
callback: undefined; | ||
callback: undefined; | ||
} | ||
@@ -74,3 +74,3 @@ | ||
export type AsyncSassFunction = AsyncSassFn0 | AsyncSassFn1 | AsyncSassFn2 | AsyncSassFn3 | AsyncSassFn4 | AsyncSassFn5 | AsyncSassFn6 | ||
| AsyncSassVarArgFn1 | AsyncSassVarArgFn2 | AsyncSassVarArgFn3 | AsyncSassVarArgFn4 | AsyncSassVarArgFn5 | AsyncSassVarArgFn6; | ||
| AsyncSassVarArgFn1 | AsyncSassVarArgFn2 | AsyncSassVarArgFn3 | AsyncSassVarArgFn4 | AsyncSassVarArgFn5 | AsyncSassVarArgFn6; | ||
@@ -82,26 +82,26 @@ export type SassFunction = SyncSassFunction | AsyncSassFunction; | ||
export interface Options { | ||
file?: string; | ||
data?: string; | ||
importer?: Importer | Importer[]; | ||
functions?: FunctionDeclarations; | ||
includePaths?: string[]; | ||
indentedSyntax?: boolean; | ||
indentType?: string; | ||
indentWidth?: number; | ||
linefeed?: string; | ||
omitSourceMapUrl?: boolean; | ||
outFile?: string; | ||
outputStyle?: "compact" | "compressed" | "expanded" | "nested"; | ||
precision?: number; | ||
sourceComments?: boolean; | ||
sourceMap?: boolean | string; | ||
sourceMapContents?: boolean; | ||
sourceMapEmbed?: boolean; | ||
sourceMapRoot?: string; | ||
[key: string]: any; | ||
file?: string; | ||
data?: string; | ||
importer?: Importer | Importer[]; | ||
functions?: FunctionDeclarations; | ||
includePaths?: string[]; | ||
indentedSyntax?: boolean; | ||
indentType?: string; | ||
indentWidth?: number; | ||
linefeed?: string; | ||
omitSourceMapUrl?: boolean; | ||
outFile?: string; | ||
outputStyle?: "compact" | "compressed" | "expanded" | "nested"; | ||
precision?: number; | ||
sourceComments?: boolean; | ||
sourceMap?: boolean | string; | ||
sourceMapContents?: boolean; | ||
sourceMapEmbed?: boolean; | ||
sourceMapRoot?: string; | ||
[key: string]: any; | ||
} | ||
export interface SyncOptions extends Options { | ||
functions?: FunctionDeclarations<SyncSassFunction>; | ||
importer?: SyncImporter | SyncImporter[]; | ||
functions?: FunctionDeclarations<SyncSassFunction>; | ||
importer?: SyncImporter | SyncImporter[]; | ||
} | ||
@@ -115,7 +115,7 @@ | ||
export interface SassError extends Error { | ||
message: string; | ||
line: number; | ||
column: number; | ||
status: number; | ||
file: string; | ||
message: string; | ||
line: number; | ||
column: number; | ||
status: number; | ||
file: string; | ||
} | ||
@@ -127,11 +127,11 @@ | ||
export interface Result { | ||
css: Buffer; | ||
map: Buffer; | ||
stats: { | ||
entry: string; | ||
start: number; | ||
end: number; | ||
duration: number; | ||
includedFiles: string[]; | ||
}; | ||
css: Buffer; | ||
map: Buffer; | ||
stats: { | ||
entry: string; | ||
start: number; | ||
end: number; | ||
duration: number; | ||
includedFiles: string[]; | ||
}; | ||
} | ||
@@ -147,261 +147,261 @@ export type SassRenderCallback = (err: SassError, result: Result) => any; | ||
export namespace types { | ||
/* eslint-disable @typescript-eslint/ban-types */ | ||
/* tslint:disable:ban-types */ | ||
/** | ||
* Values that are received from Sass as an argument to a javascript function. | ||
*/ | ||
export type Value = Null | Number | String | Color | Boolean | List | Map; | ||
/* eslint-disable @typescript-eslint/ban-types */ | ||
/* tslint:disable:ban-types */ | ||
/** | ||
* Values that are received from Sass as an argument to a javascript function. | ||
*/ | ||
export type Value = Null | Number | String | Color | Boolean | List | Map; | ||
/** | ||
* Values that are legal to return to Sass from a javascript function. | ||
*/ | ||
export type ReturnValue = Value | Error; | ||
/** | ||
* Values that are legal to return to Sass from a javascript function. | ||
*/ | ||
export type ReturnValue = Value | Error; | ||
// *** Sass Null *** | ||
// *** Sass Null *** | ||
export interface Null { | ||
/** | ||
* This property doesn't exist, but its presence forces the typescript | ||
* compiler to properly type check this type. Without it, it seems to | ||
* allow things that aren't types.Null to match it in case statements and | ||
* assignments. | ||
*/ | ||
readonly ___NULL___: unique symbol; | ||
} | ||
export interface Null { | ||
/** | ||
* This property doesn't exist, but its presence forces the typescript | ||
* compiler to properly type check this type. Without it, it seems to | ||
* allow things that aren't types.Null to match it in case statements and | ||
* assignments. | ||
*/ | ||
readonly ___NULL___: unique symbol; | ||
} | ||
interface NullConstructor { | ||
(): Null; | ||
NULL: Null; | ||
} | ||
export const Null: NullConstructor; | ||
interface NullConstructor { | ||
(): Null; | ||
NULL: Null; | ||
} | ||
export const Null: NullConstructor; | ||
// *** Sass Number *** | ||
// *** Sass Number *** | ||
export interface Number { | ||
getValue(): number; | ||
setValue(n: number): void; | ||
getUnit(): string; | ||
setUnit(u: string): void; | ||
} | ||
interface NumberConstructor { | ||
/** | ||
* Constructs a new Sass number. Does not require use of the `new` keyword. | ||
*/ | ||
new(value: number, unit?: string): Number; | ||
/** | ||
* Constructs a new Sass number. Can also be used with the `new` keyword. | ||
*/ | ||
(value: number, unit?: string): Number; | ||
} | ||
export interface Number { | ||
getValue(): number; | ||
setValue(n: number): void; | ||
getUnit(): string; | ||
setUnit(u: string): void; | ||
} | ||
interface NumberConstructor { | ||
/** | ||
* Constructs a new Sass number. Does not require use of the `new` keyword. | ||
*/ | ||
new(value: number, unit?: string): Number; | ||
/** | ||
* Constructs a new Sass number. Can also be used with the `new` keyword. | ||
*/ | ||
(value: number, unit?: string): Number; | ||
} | ||
export const Number: NumberConstructor; | ||
export const Number: NumberConstructor; | ||
// *** Sass String *** | ||
// *** Sass String *** | ||
export interface String { | ||
getValue(): string; | ||
setValue(s: string): void; | ||
} | ||
export interface String { | ||
getValue(): string; | ||
setValue(s: string): void; | ||
} | ||
interface StringConstructor { | ||
/** | ||
* Constructs a new Sass string. Does not require use of the `new` keyword. | ||
*/ | ||
new (value: string): String; | ||
/** | ||
* Constructs a new Sass string. Can also be used with the `new` keyword. | ||
*/ | ||
(value: string): String; | ||
} | ||
interface StringConstructor { | ||
/** | ||
* Constructs a new Sass string. Does not require use of the `new` keyword. | ||
*/ | ||
new (value: string): String; | ||
/** | ||
* Constructs a new Sass string. Can also be used with the `new` keyword. | ||
*/ | ||
(value: string): String; | ||
} | ||
export const String: StringConstructor; | ||
export const String: StringConstructor; | ||
// *** Sass Color *** | ||
// *** Sass Color *** | ||
export interface Color { | ||
/** | ||
* Get the red component of the color. | ||
* @returns integer between 0 and 255 inclusive; | ||
*/ | ||
getR(): number; | ||
/** | ||
* Set the red component of the color. | ||
* @returns integer between 0 and 255 inclusive; | ||
*/ | ||
setR(r: number): void; | ||
/** | ||
* Get the green component of the color. | ||
* @returns integer between 0 and 255 inclusive; | ||
*/ | ||
getG(): number; | ||
/** | ||
* Set the green component of the color. | ||
* @param g integer between 0 and 255 inclusive; | ||
*/ | ||
setG(g: number): void; | ||
/** | ||
* Get the blue component of the color. | ||
* @returns integer between 0 and 255 inclusive; | ||
*/ | ||
getB(): number; | ||
/** | ||
* Set the blue component of the color. | ||
* @param b integer between 0 and 255 inclusive; | ||
*/ | ||
setB(b: number): void; | ||
/** | ||
* Get the alpha transparency component of the color. | ||
* @returns number between 0 and 1 inclusive; | ||
*/ | ||
getA(): number; | ||
/** | ||
* Set the alpha component of the color. | ||
* @param a number between 0 and 1 inclusive; | ||
*/ | ||
setA(a: number): void; | ||
} | ||
export interface Color { | ||
/** | ||
* Get the red component of the color. | ||
* @returns integer between 0 and 255 inclusive; | ||
*/ | ||
getR(): number; | ||
/** | ||
* Set the red component of the color. | ||
* @returns integer between 0 and 255 inclusive; | ||
*/ | ||
setR(r: number): void; | ||
/** | ||
* Get the green component of the color. | ||
* @returns integer between 0 and 255 inclusive; | ||
*/ | ||
getG(): number; | ||
/** | ||
* Set the green component of the color. | ||
* @param g integer between 0 and 255 inclusive; | ||
*/ | ||
setG(g: number): void; | ||
/** | ||
* Get the blue component of the color. | ||
* @returns integer between 0 and 255 inclusive; | ||
*/ | ||
getB(): number; | ||
/** | ||
* Set the blue component of the color. | ||
* @param b integer between 0 and 255 inclusive; | ||
*/ | ||
setB(b: number): void; | ||
/** | ||
* Get the alpha transparency component of the color. | ||
* @returns number between 0 and 1 inclusive; | ||
*/ | ||
getA(): number; | ||
/** | ||
* Set the alpha component of the color. | ||
* @param a number between 0 and 1 inclusive; | ||
*/ | ||
setA(a: number): void; | ||
} | ||
interface ColorConstructor { | ||
/** | ||
* Constructs a new Sass color given the RGBA component values. Do not invoke with the `new` keyword. | ||
* | ||
* @param r integer 0-255 inclusive | ||
* @param g integer 0-255 inclusive | ||
* @param b integer 0-255 inclusive | ||
* @param [a] float 0 - 1 inclusive | ||
* @returns a SassColor instance. | ||
*/ | ||
new (r: number, g: number, b: number, a?: number): Color; | ||
interface ColorConstructor { | ||
/** | ||
* Constructs a new Sass color given the RGBA component values. Do not invoke with the `new` keyword. | ||
* | ||
* @param r integer 0-255 inclusive | ||
* @param g integer 0-255 inclusive | ||
* @param b integer 0-255 inclusive | ||
* @param [a] float 0 - 1 inclusive | ||
* @returns a SassColor instance. | ||
*/ | ||
new (r: number, g: number, b: number, a?: number): Color; | ||
/** | ||
* Constructs a new Sass color given a 4 byte number. Do not invoke with the `new` keyword. | ||
* | ||
* If a single number is passed it is assumed to be a number that contains | ||
* all the components which are extracted using bitmasks and bitshifting. | ||
* | ||
* @param hexN A number that is usually written in hexadecimal form. E.g. 0xff0088cc. | ||
* @returns a Sass Color instance. | ||
* @example | ||
* // Comparison with byte array manipulation | ||
* let a = new ArrayBuffer(4); | ||
* let hexN = 0xCCFF0088; // 0xAARRGGBB | ||
* let a32 = new Uint32Array(a); // Uint32Array [ 0 ] | ||
* a32[0] = hexN; | ||
* let a8 = new Uint8Array(a); // Uint8Array [ 136, 0, 255, 204 ] | ||
* let componentBytes = [a8[2], a8[1], a8[0], a8[3] / 255] // [ 136, 0, 255, 0.8 ] | ||
* let c = sass.types.Color(hexN); | ||
* let components = [c.getR(), c.getG(), c.getR(), c.getA()] // [ 136, 0, 255, 0.8 ] | ||
* assert.deepEqual(componentBytes, components); // does not raise. | ||
*/ | ||
new (hexN: number): Color; | ||
/** | ||
* Constructs a new Sass color given a 4 byte number. Do not invoke with the `new` keyword. | ||
* | ||
* If a single number is passed it is assumed to be a number that contains | ||
* all the components which are extracted using bitmasks and bitshifting. | ||
* | ||
* @param hexN A number that is usually written in hexadecimal form. E.g. 0xff0088cc. | ||
* @returns a Sass Color instance. | ||
* @example | ||
* // Comparison with byte array manipulation | ||
* let a = new ArrayBuffer(4); | ||
* let hexN = 0xCCFF0088; // 0xAARRGGBB | ||
* let a32 = new Uint32Array(a); // Uint32Array [ 0 ] | ||
* a32[0] = hexN; | ||
* let a8 = new Uint8Array(a); // Uint8Array [ 136, 0, 255, 204 ] | ||
* let componentBytes = [a8[2], a8[1], a8[0], a8[3] / 255] // [ 136, 0, 255, 0.8 ] | ||
* let c = sass.types.Color(hexN); | ||
* let components = [c.getR(), c.getG(), c.getR(), c.getA()] // [ 136, 0, 255, 0.8 ] | ||
* assert.deepEqual(componentBytes, components); // does not raise. | ||
*/ | ||
new (hexN: number): Color; | ||
/** | ||
* Constructs a new Sass color given the RGBA component values. Do not invoke with the `new` keyword. | ||
* | ||
* @param r integer 0-255 inclusive | ||
* @param g integer 0-255 inclusive | ||
* @param b integer 0-255 inclusive | ||
* @param [a] float 0 - 1 inclusive | ||
* @returns a SassColor instance. | ||
*/ | ||
(r: number, g: number, b: number, a?: number): Color; | ||
/** | ||
* Constructs a new Sass color given the RGBA component values. Do not invoke with the `new` keyword. | ||
* | ||
* @param r integer 0-255 inclusive | ||
* @param g integer 0-255 inclusive | ||
* @param b integer 0-255 inclusive | ||
* @param [a] float 0 - 1 inclusive | ||
* @returns a SassColor instance. | ||
*/ | ||
(r: number, g: number, b: number, a?: number): Color; | ||
/** | ||
* Constructs a new Sass color given a 4 byte number. Do not invoke with the `new` keyword. | ||
* | ||
* If a single number is passed it is assumed to be a number that contains | ||
* all the components which are extracted using bitmasks and bitshifting. | ||
* | ||
* @param hexN A number that is usually written in hexadecimal form. E.g. 0xff0088cc. | ||
* @returns a Sass Color instance. | ||
* @example | ||
* // Comparison with byte array manipulation | ||
* let a = new ArrayBuffer(4); | ||
* let hexN = 0xCCFF0088; // 0xAARRGGBB | ||
* let a32 = new Uint32Array(a); // Uint32Array [ 0 ] | ||
* a32[0] = hexN; | ||
* let a8 = new Uint8Array(a); // Uint8Array [ 136, 0, 255, 204 ] | ||
* let componentBytes = [a8[2], a8[1], a8[0], a8[3] / 255] // [ 136, 0, 255, 0.8 ] | ||
* let c = sass.types.Color(hexN); | ||
* let components = [c.getR(), c.getG(), c.getR(), c.getA()] // [ 136, 0, 255, 0.8 ] | ||
* assert.deepEqual(componentBytes, components); // does not raise. | ||
*/ | ||
(hexN: number): Color; | ||
} | ||
/** | ||
* Constructs a new Sass color given a 4 byte number. Do not invoke with the `new` keyword. | ||
* | ||
* If a single number is passed it is assumed to be a number that contains | ||
* all the components which are extracted using bitmasks and bitshifting. | ||
* | ||
* @param hexN A number that is usually written in hexadecimal form. E.g. 0xff0088cc. | ||
* @returns a Sass Color instance. | ||
* @example | ||
* // Comparison with byte array manipulation | ||
* let a = new ArrayBuffer(4); | ||
* let hexN = 0xCCFF0088; // 0xAARRGGBB | ||
* let a32 = new Uint32Array(a); // Uint32Array [ 0 ] | ||
* a32[0] = hexN; | ||
* let a8 = new Uint8Array(a); // Uint8Array [ 136, 0, 255, 204 ] | ||
* let componentBytes = [a8[2], a8[1], a8[0], a8[3] / 255] // [ 136, 0, 255, 0.8 ] | ||
* let c = sass.types.Color(hexN); | ||
* let components = [c.getR(), c.getG(), c.getR(), c.getA()] // [ 136, 0, 255, 0.8 ] | ||
* assert.deepEqual(componentBytes, components); // does not raise. | ||
*/ | ||
(hexN: number): Color; | ||
} | ||
export const Color: ColorConstructor; | ||
export const Color: ColorConstructor; | ||
// *** Sass Boolean *** | ||
// *** Sass Boolean *** | ||
export interface Boolean { | ||
getValue(): boolean; | ||
} | ||
export interface Boolean { | ||
getValue(): boolean; | ||
} | ||
interface BooleanConstructor { | ||
(bool: boolean): Boolean; | ||
TRUE: Boolean; | ||
FALSE: Boolean; | ||
} | ||
interface BooleanConstructor { | ||
(bool: boolean): Boolean; | ||
TRUE: Boolean; | ||
FALSE: Boolean; | ||
} | ||
export const Boolean: BooleanConstructor; | ||
export const Boolean: BooleanConstructor; | ||
// *** Sass List *** | ||
// *** Sass List *** | ||
export interface Enumerable { | ||
getValue(index: number): Value; | ||
setValue(index: number, value: Value): void; | ||
getLength(): number; | ||
} | ||
export interface Enumerable { | ||
getValue(index: number): Value; | ||
setValue(index: number, value: Value): void; | ||
getLength(): number; | ||
} | ||
export interface List extends Enumerable { | ||
getSeparator(): boolean; | ||
setSeparator(isComma: boolean): void; | ||
} | ||
interface ListConstructor { | ||
new (length: number, commaSeparator?: boolean): List; | ||
(length: number, commaSeparator?: boolean): List; | ||
} | ||
export const List: ListConstructor; | ||
export interface List extends Enumerable { | ||
getSeparator(): boolean; | ||
setSeparator(isComma: boolean): void; | ||
} | ||
interface ListConstructor { | ||
new (length: number, commaSeparator?: boolean): List; | ||
(length: number, commaSeparator?: boolean): List; | ||
} | ||
export const List: ListConstructor; | ||
// *** Sass Map *** | ||
// *** Sass Map *** | ||
export interface Map extends Enumerable { | ||
getKey(index: number): Value; | ||
setKey(index: number, key: Value): void; | ||
} | ||
interface MapConstructor { | ||
new (length: number): Map; | ||
(length: number): Map; | ||
} | ||
export const Map: MapConstructor; | ||
export interface Map extends Enumerable { | ||
getKey(index: number): Value; | ||
setKey(index: number, key: Value): void; | ||
} | ||
interface MapConstructor { | ||
new (length: number): Map; | ||
(length: number): Map; | ||
} | ||
export const Map: MapConstructor; | ||
// *** Sass Error *** | ||
// *** Sass Error *** | ||
export interface Error { | ||
/** | ||
* This property doesn't exist, but its presence forces the typescript | ||
* compiler to properly type check this type. Without it, it seems to | ||
* allow things that aren't types.Error to match it in case statements and | ||
* assignments. | ||
*/ | ||
readonly ___SASS_ERROR___: unique symbol; | ||
// why isn't there a getMessage() method? | ||
} | ||
export interface Error { | ||
/** | ||
* This property doesn't exist, but its presence forces the typescript | ||
* compiler to properly type check this type. Without it, it seems to | ||
* allow things that aren't types.Error to match it in case statements and | ||
* assignments. | ||
*/ | ||
readonly ___SASS_ERROR___: unique symbol; | ||
// why isn't there a getMessage() method? | ||
} | ||
interface ErrorConstructor { | ||
/** | ||
* An error return value for async functions. | ||
* For synchronous functions, this can be returned or a standard error object can be thrown. | ||
*/ | ||
new (message: string): Error; | ||
/** | ||
* An error return value for async functions. | ||
* For synchronous functions, this can be returned or a standard error object can be thrown. | ||
*/ | ||
(message: string): Error; | ||
} | ||
export const Error: ErrorConstructor; | ||
interface ErrorConstructor { | ||
/** | ||
* An error return value for async functions. | ||
* For synchronous functions, this can be returned or a standard error object can be thrown. | ||
*/ | ||
new (message: string): Error; | ||
/** | ||
* An error return value for async functions. | ||
* For synchronous functions, this can be returned or a standard error object can be thrown. | ||
*/ | ||
(message: string): Error; | ||
} | ||
export const Error: ErrorConstructor; | ||
/* eslint-enable @typescript-eslint/ban-types */ | ||
/* tslint:enable:ban-types */ | ||
/* eslint-enable @typescript-eslint/ban-types */ | ||
/* tslint:enable:ban-types */ | ||
} | ||
@@ -408,0 +408,0 @@ |
{ | ||
"name": "@types/node-sass", | ||
"version": "4.11.0", | ||
"version": "4.11.1", | ||
"description": "TypeScript definitions for node-sass", | ||
@@ -19,6 +19,7 @@ "license": "MIT", | ||
"main": "", | ||
"types": "index", | ||
"types": "index.d.ts", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git" | ||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", | ||
"directory": "types/node-sass" | ||
}, | ||
@@ -29,4 +30,4 @@ "scripts": {}, | ||
}, | ||
"typesPublisherContentHash": "08474c1c1c0738369521cbab996560c7a3c6b631d3cd33f13846419a1cc62649", | ||
"typeScriptVersion": "2.7" | ||
"typesPublisherContentHash": "523fd36cd2b673bd27b5baafa9fc3beae29e23aac8a432b288f58c2bf100282a", | ||
"typeScriptVersion": "3.0" | ||
} |
@@ -5,13 +5,13 @@ # Installation | ||
# Summary | ||
This package contains type definitions for node-sass ( https://github.com/sass/node-sass ). | ||
This package contains type definitions for node-sass (https://github.com/sass/node-sass). | ||
# Details | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-sass | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-sass. | ||
Additional Details | ||
* Last updated: Tue, 19 Feb 2019 18:47:12 GMT | ||
* Dependencies: @types/node | ||
### Additional Details | ||
* Last updated: Fri, 15 May 2020 11:31:22 GMT | ||
* Dependencies: [@types/node](https://npmjs.com/package/@types/node) | ||
* Global values: none | ||
# Credits | ||
These definitions were written by Asana <https://github.com/pspeter3>, Chris Eppstein <https://github.com/chriseppstein>. | ||
These definitions were written by [Asana](https://github.com/pspeter3), and [Chris Eppstein](https://github.com/chriseppstein). |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
18697
0