Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
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@v3.8.1/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>