import { add } from "https://deno.land/x/denops_std@v6.5.0/lambda/mod.ts";
Add a lambda function to a denops API and return the lambda object
import type { Entrypoint } from "https://deno.land/x/denops_std@v6.5.0/mod.ts";
import * as lambda from "https://deno.land/x/denops_std@v6.5.0/lambda/mod.ts";
export const main: Entrypoint = async (denops) => {
// Add lambda function
const lo = lambda.add(
denops,
() => {
// Do what ever you want.
},
);
// Call the lambda function from Vim script
await denops.eval(lo.request());
// Dispose the lambda object
lo.dispose();
}