4.1.2 • Published 7 months ago

@types/find-unused-sass-variables v4.1.2

Weekly downloads
360
License
MIT
Repository
github
Last release
7 months ago

Installation

npm install --save @types/find-unused-sass-variables

Summary

This package contains type definitions for find-unused-sass-variables (https://github.com/XhmikosR/find-unused-sass-variables#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/find-unused-sass-variables.

index.d.ts

// Type definitions for find-unused-sass-variables 4.0
// Project: https://github.com/XhmikosR/find-unused-sass-variables#readme
// Definitions by: Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

declare const _default: {
    /**
     * Returns an object with `unused` and `total`.
     * `unused` has the array of unused variables and `total` has the sum of all variables in the files
     * (unused and used ones).
     */
    find: (dir: string, options?: Options) => Results;
    /**
     * Returns a Promise which resolves result; is the same as `find(dir, options)` result.
     */
    findAsync: (dir: string, options?: Options) => Promise<Results>;
};

export interface Options {
    /** Array of strings of the variables to ignore, e.g. `['$my-var', '$my-second-var']` */
    ignore?: string[] | undefined;
    /** Array of file extensions to search for unused variables in. e.g. `['scss']` */
    fileExtensions?: string[] | undefined;
}

export interface Results {
    /** the array of unused variables */
    readonly unused: string[];
    /** he sum of all variables in the files (unused and used ones) */
    readonly total: number;
}

export default _default;

Additional Details

  • Last updated: Thu, 03 Feb 2022 13:31:28 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Piotr Błażejewicz.

4.1.2

7 months ago

4.1.1

7 months ago

4.1.0

1 year ago

4.0.0

2 years ago

3.1.0

3 years ago

2.0.1

3 years ago

2.0.0

4 years ago

1.0.0

4 years ago