Skip to main content
Deno 2 is finally here ๐ŸŽ‰๏ธ
Learn more
Module

x/denops_std/function/vim/mod.ts>exists_compiled

๐Ÿ“š Standard module for denops.vim
Go to Latest
function exists_compiled
import { exists_compiled } from "https://deno.land/x/denops_std@v4.1.4/function/vim/mod.ts";

Like exists() but evaluated at compile time. This is useful to skip a block where a function is used that would otherwise give an error: if exists_compiled('*ThatFunction') ThatFunction('works') endif If exists() were used then a compilation error would be given if ThatFunction() is not defined. {expr} must be a literal string. Can only be used in a |:def| function. This does not work to check for arguments or local variables.

Parameters

denops: Denops
expr: unknown

Returns

Promise<unknown>