diff --git a/types/less/index.d.ts b/types/less/index.d.ts index 354a342bf9..bca5c21c33 100644 --- a/types/less/index.d.ts +++ b/types/less/index.d.ts @@ -1,6 +1,8 @@ // Type definitions for LESS // Project: http://lesscss.org/ -// Definitions by: Tom Hasner , Pranay Prakash +// Definitions by: Tom Hasner +// Pranay Prakash +// Daniel Waxweiler // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace Less { @@ -79,6 +81,10 @@ declare namespace Less { interface LessStatic { options: Less.StaticOptions; + modifyVars(vars: { [name: string]: string }): void; + + refreshStyles(): void; + render(input: string, callback: (error: Less.RenderError, output: Less.RenderOutput) => void): void; render(input: string, options: Less.Options, callback: (error: Less.RenderError, output: Less.RenderOutput) => void): void; @@ -86,6 +92,8 @@ interface LessStatic { render(input: string, options: Less.Options): Promise; version: number[]; + + watch(): void; } declare module "less" { diff --git a/types/less/less-tests.ts b/types/less/less-tests.ts index 1668c965fa..5d0029475a 100644 --- a/types/less/less-tests.ts +++ b/types/less/less-tests.ts @@ -35,3 +35,12 @@ var options: Less.Options = { }; less.render("h1 { background: red; }", options); + +less.modifyVars({ + '@buttonFace': '#5B83AD', + '@buttonText': '#D9EEF2' +}); + +less.refreshStyles(); + +less.watch();