mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 19:07:08 +00:00
adding Less.RenderError to less.d.ts
This commit is contained in:
parent
74c2024d34
commit
311b9861ea
@ -8,6 +8,6 @@ less.render(".class { width: (1 + 1) }").then((output) => {
|
||||
|
||||
less.render("fail").then((output) => {
|
||||
throw new Error("promise should have been rejected");
|
||||
}, () => {
|
||||
console.log("rejected as expected");
|
||||
}, (error: Less.RenderError) => {
|
||||
console.log("rejected as expected on line number " + error.line);
|
||||
});
|
||||
|
||||
14
less/less.d.ts
vendored
14
less/less.d.ts
vendored
@ -51,6 +51,16 @@ declare module Less {
|
||||
rootFileInfo?: RootFileInfo;
|
||||
}
|
||||
|
||||
interface RenderError {
|
||||
column: number;
|
||||
extract: string[];
|
||||
filename: string;
|
||||
index: number;
|
||||
line: number;
|
||||
message: string;
|
||||
type: string;
|
||||
}
|
||||
|
||||
interface RenderOutput {
|
||||
css: string;
|
||||
map: string;
|
||||
@ -59,8 +69,8 @@ declare module Less {
|
||||
}
|
||||
|
||||
interface LessStatic {
|
||||
render(input: string, callback: (output: Less.RenderOutput) => void): void;
|
||||
render(input: string, options: Less.Options, callback: (output: Less.RenderOutput) => void): 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;
|
||||
|
||||
render(input: string): Less.Promise<Less.RenderOutput>;
|
||||
render(input: string, options: Less.Options): Less.Promise<Less.RenderOutput>;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user