mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
added format command and added trailing commas to reduce conflicts
This commit is contained in:
@@ -7,11 +7,11 @@ const first = getNamedTask(
|
||||
//throw new Error("Error");
|
||||
return {
|
||||
inner: {
|
||||
result: 2
|
||||
}
|
||||
result: 2,
|
||||
},
|
||||
};
|
||||
},
|
||||
1000
|
||||
1000,
|
||||
);
|
||||
const second = getNamedTask("second (if match)");
|
||||
const third = getNamedTask("third (if error)");
|
||||
|
||||
@@ -11,7 +11,7 @@ class ExecTask extends Task {
|
||||
constructor(
|
||||
name: string,
|
||||
params: any,
|
||||
private fn: () => any
|
||||
private fn: () => any,
|
||||
) {
|
||||
super(name, params);
|
||||
}
|
||||
@@ -54,8 +54,8 @@ export function getNamedTask(name: string, _func?: () => Promise<any>, delay?: n
|
||||
return new ExecTask(
|
||||
name,
|
||||
{
|
||||
delay
|
||||
delay,
|
||||
},
|
||||
func
|
||||
func,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ const first = new LogTask("First", { delay: 1000 });
|
||||
const second = new LogTask("Second", { delay: 1000 });
|
||||
const third = new LogTask("Long Third", { delay: 2500 });
|
||||
const fourth = new FetchTask("Fetch Something", {
|
||||
url: "https://jsonplaceholder.typicode.com/todos/1"
|
||||
url: "https://jsonplaceholder.typicode.com/todos/1",
|
||||
});
|
||||
const fifth = new LogTask("Task 4", { delay: 500 }); // without connection
|
||||
|
||||
|
||||
Reference in New Issue
Block a user