• Version 5.0.4
  • Published
  • 6.3 kB
  • 1 dependency
  • MIT license


npm i @types/csso
yarn add @types/csso
pnpm add @types/csso


TypeScript definitions for csso



variable syntax

const syntax: any;

    variable version

    const version: string;


      function minify

      minify: (source: string, options?: MinifyOptions & CompressOptions) => Result;
      • Minify source CSS passed as String

        Parameter source

        Parameter options

      function minifyBlock

      minifyBlock: (
      source: string,
      options?: MinifyOptions & CompressOptions
      ) => Result;
      • The same as minify() but for list of declarations. Usually it's a style attribute value.

        Parameter source

        Parameter options


      interface CompressOptions

      interface CompressOptions {}

        property clone

        clone?: boolean | undefined;
        • Transform a copy of input AST if true. Useful in case of AST reuse. false

        property comments

        comments?: string | boolean | undefined;
        • Specify what comments to leave: - 'exclamation' or true – leave all exclamation comments - 'first-exclamation' – remove every comment except first one - false – remove all comments true

        property forceMediaMerge

        forceMediaMerge?: boolean | undefined;
        • Enables merging of rules with the same media query by splitted by other rules. The optimisation is unsafe in general, but should work fine in most cases. Use it on your own risk. false

        property logger

        logger?: (() => void) | undefined;
        • Function to track every step of transformation.

        property restructure

        restructure?: boolean | undefined;
        • Disable or enable a structure optimisations. true

        property usage

        usage?: Usage | undefined;
        • Usage data for advanced optimisations.

        interface MinifyOptions

        interface MinifyOptions {}

          property afterCompress

          afterCompress?: AfterCompressFn | AfterCompressFn[] | undefined;
          • Called right after compress() is run.

          property beforeCompress

          beforeCompress?: BeforeCompressFn | BeforeCompressFn[] | undefined;
          • Called right after parse is run.

          property debug

          debug?: boolean | undefined;
          • Output debug information to stderr. false

          property filename

          filename?: string | undefined;
          • Filename of input CSS, uses for source map generation. ''

          property restructure

          restructure?: boolean | undefined;

            property sourceMap

            sourceMap?: boolean | undefined;
            • Generate a source map when true. false

            interface Result

            interface Result {}

              property css

              css: string;
              • Resulting CSS.

              property map

              map: object | null;
              • Instance of SourceMapGenerator or null.

              interface Usage

              interface Usage {}

                property blacklist

                | {
                tags?: string[] | undefined;
                ids?: string[] | undefined;
                classes?: string[] | undefined;
                | undefined;

                  property classes

                  classes?: string[] | undefined;

                    property ids

                    ids?: string[] | undefined;

                      property scopes

                      scopes?: string[][] | undefined;

                        property tags

                        tags?: string[] | undefined;

                          Type Aliases

                          type AfterCompressFn

                          type AfterCompressFn = (compressResult: string, options: CompressOptions) => void;

                            type BeforeCompressFn

                            type BeforeCompressFn = (ast: object, options: CompressOptions) => void;

                              Package Files (1)

                              Dependencies (1)

                              Dev Dependencies (0)

                              No dev dependencies.

                              Peer Dependencies (0)

                              No peer dependencies.


                              To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                              You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/csso.

                              • Markdown
                              • HTML
                                <a href="https://www.jsdocs.io/package/@types/csso"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>