@types/find-unused-sass-variables
TypeScript icon, indicating that this package has built-in type declarations

4.1.2 • Public • Published

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

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 strings of files to ignore, e.g. `['./file-with-unused-vars.scss', '**\/_variables.scss']`. */
    ignoreFiles?: 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: Tue, 07 Nov 2023 03:09:37 GMT
  • Dependencies: none

Credits

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

Readme

Keywords

none

Package Sidebar

Install

npm i @types/find-unused-sass-variables

Weekly Downloads

362

Version

4.1.2

License

MIT

Unpacked Size

4.99 kB

Total Files

5

Last publish

Collaborators

  • types