import { type Lambda } from "https://deno.land/x/denops_std@v6.5.1/lambda/mod.ts";
Properties
readonly
id: IdentifierMethods
Create a Vim script expression to notify the lambda function
import type { Entrypoint } from "https://deno.land/x/denops_std@v6.5.1/mod.ts";
import * as lambda from "https://deno.land/x/denops_std@v6.5.1/lambda/mod.ts";
export const main: Entrypoint = async (denops) => {
const a = lambda.add(denops, () => {
// Do what ever you want.
});
await denops.cmd(`nmap <Space> <Cmd>call ${a.notify()}<CR>`);
}
Create a Vim script expression to request the lambda function
import type { Entrypoint } from "https://deno.land/x/denops_std@v6.5.1/mod.ts";
import * as lambda from "https://deno.land/x/denops_std@v6.5.1/lambda/mod.ts";
export const main: Entrypoint = async (denops) => {
const a = lambda.add(denops, () => {
// Do what ever you want.
});
await denops.cmd(`nmap <Space> <Cmd>call ${a.request()}<CR>`);
}
Dispose the lambda function
import type { Entrypoint } from "https://deno.land/x/denops_std@v6.5.1/mod.ts";
import * as lambda from "https://deno.land/x/denops_std@v6.5.1/lambda/mod.ts";
export const main: Entrypoint = async (denops) => {
const a = lambda.add(denops, () => {
// Do what ever you want.
});
// Dispose the lambda function manually
a.dispose();
}