Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/less

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/less

TypeScript definitions for less

  • 3.0.7
  • ts4.9
  • ts5.0
  • ts5.1
  • ts5.2
  • ts5.3
  • ts5.4
  • ts5.5
  • ts5.6
  • ts5.7
  • ts5.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
404K
decreased by-1.4%
Maintainers
1
Weekly downloads
 
Created

What is @types/less?

@types/less provides TypeScript type definitions for the Less CSS preprocessor, allowing developers to use Less in TypeScript projects with type safety and autocompletion.

What are @types/less's main functionalities?

Compiling Less to CSS

This feature allows you to compile Less code into CSS. The code sample demonstrates how to use the Less compiler to convert a Less string into CSS.

const less = require('less');
const input = '.class { width: (1 + 1) }';
less.render(input, (e, output) => {
  console.log(output.css);
});

Using Less with options

This feature allows you to compile Less code with additional options such as compression. The code sample shows how to pass options to the Less compiler.

const less = require('less');
const input = '.class { width: (1 + 1) }';
const options = { compress: true };
less.render(input, options, (e, output) => {
  console.log(output.css);
});

Handling errors

This feature demonstrates how to handle errors during the Less compilation process. The code sample shows how to catch and log errors.

const less = require('less');
const input = '.class { width: (1 + 1) }';
less.render(input, (e, output) => {
  if (e) {
    console.error(e);
  } else {
    console.log(output.css);
  }
});

Other packages similar to @types/less

FAQs

Package last updated on 19 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc