mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-20 06:12:54 +08:00
14 lines
318 B
TypeScript
14 lines
318 B
TypeScript
/// <reference path="less.d.ts" />
|
|
|
|
import less = require("less");
|
|
|
|
less.render(".class { width: (1 + 1) }").then((output) => {
|
|
console.log(output.css);
|
|
});
|
|
|
|
less.render("fail").then((output) => {
|
|
throw new Error("promise should have been rejected");
|
|
}, () => {
|
|
console.log("rejected as expected");
|
|
});
|