# @types/postcss-less

> TypeScript definitions for postcss-less

Latest version **4.0.7** (published 2025-10-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/postcss-less
pnpm add @types/postcss-less
yarn add @types/postcss-less
bun add @types/postcss-less
```

## Health

**Score 65/100 (B)** — status: stable.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 4.0.7 |
| Published | 2025-10-24 |
| First published | 2020-07-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51446 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/postcss-less
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/postcss-less
- npm.io page: https://npm.io/package/@types/postcss-less

## Dependencies (1)

- [postcss](https://npm.io/package/postcss.md) ^8.1.2

## Recent versions

- 4.0.7 (latest) — 2025-10-24
- 4.0.6 (ts5.1) — 2023-11-07
- 4.0.2 (ts3.8) — 2022-01-10
- 4.0.1 (ts3.7) — 2021-07-08
- 3.1.1 (ts3.6) — 2020-08-03
- 4.0.5 — 2023-10-18
- 4.0.4 — 2023-10-10
- 4.0.3 — 2023-09-24
- 4.0.0 — 2020-11-23
- 3.1.0 — 2020-07-23

## README

# Installation
> `npm install --save @types/postcss-less`

# Summary
This package contains type definitions for postcss-less (https://github.com/shellscape/postcss-less).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/postcss-less.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/postcss-less/index.d.ts)
````ts
import postcss = require("postcss");

export = postcssLess;

declare const postcssLess: postcss.Syntax & {
    parse: postcss.Parser<postcss.Root>;
    stringify: postcss.Stringifier;
    nodeToString: (node: postcss.Node) => string;
};

declare namespace postcssLess {
    // @see https://github.com/shellscape/postcss-less/blob/v3.1.4/lib/nodes/import.js
    interface ImportAtRule extends postcss.AtRule {
        import: true;
        filename: string;
        options?: string | undefined;
    }

    // @see https://github.com/shellscape/postcss-less/blob/v3.1.4/lib/nodes/variable.js
    interface VariableAtRule extends postcss.AtRule {
        variable: true;
        value: string;
    }

    // @see https://github.com/shellscape/postcss-less/blob/v3.1.4/lib/LessParser.js#L147-L151
    interface MixinAtRule extends postcss.AtRule {
        mixin: true;
        important?: true | undefined;
    }

    // @see https://github.com/shellscape/postcss-less/blob/v3.1.4/lib/LessParser.js#L57
    interface FunctionAtRule extends postcss.AtRule {
        function: true;
    }

    type AtRule = ImportAtRule | VariableAtRule | MixinAtRule | FunctionAtRule;

    // @see https://github.com/shellscape/postcss-less/blob/v3.1.4/lib/LessParser.js#L187
    interface ExtendRule extends postcss.Rule {
        extend: true;
    }

    type Rule = ExtendRule;

    // @see https://github.com/shellscape/postcss-less/blob/v3.1.4/lib/LessParser.js#L187
    interface ExtendDeclaration extends postcss.Declaration {
        extend: true;
    }

    type Declaration = ExtendDeclaration;

    // @see https://github.com/shellscape/postcss-less/blob/v3.1.4/lib/LessParser.js#L73
    interface InlineComment extends postcss.Comment {
        inline: true;
    }

    type Comment = InlineComment;
}

````

### Additional Details
 * Last updated: Fri, 24 Oct 2025 04:02:41 GMT
 * Dependencies: [postcss](https://npmjs.com/package/postcss)

# Credits
These definitions were written by [Masafumi Koba](https://github.com/ybiquitous), and [Daniel Cassidy](https://github.com/djcsdy).

---
_Source: https://npm.io/package/@types/postcss-less · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
