File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -160,11 +160,11 @@ class BatchHelper implements Denops {
160
160
* ```typescript
161
161
* import { Denops } from "../mod.ts";
162
162
* import { batch } from "./batch.ts";
163
- * import * as anonymous from "../anonymous /mod.ts";
163
+ * import * as lambda from "../lambda /mod.ts";
164
164
*
165
165
* export async function main(denops: Denops): Promise<void> {
166
166
* await batch(denops, async (denops) => {
167
- * const [id] = anonymous.add (denops, async () => {
167
+ * const id = lambda.register (denops, async () => {
168
168
* // This code is called outside of 'batch' block
169
169
* // thus the 'denops' instance works like a real one.
170
170
* // That's why you can write code like below
Original file line number Diff line number Diff line change 4
4
assertString ,
5
5
} from "https://deno.land/x/unknownutil@v2.1.0/mod.ts" ;
6
6
import * as fn from "../function/mod.ts" ;
7
- import * as anonymous from "../anonymous /mod.ts" ;
7
+ import * as lambda from "../lambda /mod.ts" ;
8
8
import { execute } from "./execute.ts" ;
9
9
import { generateUniqueString } from "../util.ts" ;
10
10
@@ -213,7 +213,7 @@ export async function input(
213
213
const suffix = await ensurePrerequisites ( denops ) ;
214
214
const completion = options . completion ?? null ;
215
215
if ( completion && typeof completion !== "string" ) {
216
- const [ id ] = anonymous . add ( denops , async ( arglead , cmdline , cursorpos ) => {
216
+ const id = lambda . register ( denops , async ( arglead , cmdline , cursorpos ) => {
217
217
assertString ( arglead ) ;
218
218
assertString ( cmdline ) ;
219
219
assertNumber ( cursorpos ) ;
@@ -228,7 +228,7 @@ export async function input(
228
228
options . inputsave ?? false ,
229
229
) as Promise < string | null > ;
230
230
} finally {
231
- anonymous . remove ( denops , id ) ;
231
+ lambda . unregister ( denops , id ) ;
232
232
}
233
233
}
234
234
if ( completion && ! fn . isValidBuiltinCompletion ( completion ) ) {
You can’t perform that action at this time.
0 commit comments