From 826d14ed99aa0a78a20d27ed1253474521b01db8 Mon Sep 17 00:00:00 2001 From: "tsuyoshi.nakai" Date: Thu, 27 Jun 2024 20:36:45 +0900 Subject: [PATCH] use entrypoint --- denops/denippet/deps/denops.ts | 2 +- denops/denippet/main.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/denops/denippet/deps/denops.ts b/denops/denippet/deps/denops.ts index 37420b3..a7602fd 100644 --- a/denops/denippet/deps/denops.ts +++ b/denops/denippet/deps/denops.ts @@ -1,4 +1,4 @@ -export type { Denops } from "https://deno.land/x/denops_std@v6.5.0/mod.ts"; +export type { Denops, Entrypoint } from "https://deno.land/x/denops_std@v6.5.0/mod.ts"; export * as fn from "https://deno.land/x/denops_std@v6.5.0/function/mod.ts"; export * as api from "https://deno.land/x/denops_std@v6.5.0/function/nvim/mod.ts"; export * as vim from "https://deno.land/x/denops_std@v6.5.0/function/vim/mod.ts"; diff --git a/denops/denippet/main.ts b/denops/denippet/main.ts index 181461b..e10c9a9 100644 --- a/denops/denippet/main.ts +++ b/denops/denippet/main.ts @@ -1,4 +1,4 @@ -import { au, Denops, fn, g, lambda } from "./deps/denops.ts"; +import { au, Denops, Entrypoint, fn, g, lambda } from "./deps/denops.ts"; import { is, u } from "./deps/unknownutil.ts"; import { lsputil } from "./deps/lsp.ts"; import { Loader, NormalizedSnippet } from "./loader.ts"; @@ -52,7 +52,7 @@ async function searchSnippet( return bestMatch; } -export function main(denops: Denops): void { +export const main: Entrypoint = (denops) => { const session = new Session(denops); const loader = new Loader(denops); @@ -266,4 +266,4 @@ export function main(denops: Denops): void { session.unguard(); }, }; -} +};