11import type { Denops } from "@denops/core" ;
22import type {
33 AutocmdEvent ,
4+ AutocmdPattern ,
45 DefineOptions ,
56 EmitOptions ,
67 ListOptions ,
@@ -42,7 +43,7 @@ import { buildDefineExpr, buildRemoveExpr } from "./_utils.ts";
4243export async function define (
4344 denops : Denops ,
4445 event : AutocmdEvent | readonly AutocmdEvent [ ] ,
45- pat : string | readonly string [ ] ,
46+ pat : AutocmdPattern | readonly AutocmdPattern [ ] ,
4647 cmd : string ,
4748 options : DefineOptions = { } ,
4849) : Promise < void > {
@@ -77,7 +78,7 @@ export async function define(
7778export async function remove (
7879 denops : Denops ,
7980 event ?: "*" | AutocmdEvent | readonly AutocmdEvent [ ] ,
80- pat ?: string | readonly string [ ] ,
81+ pat ?: AutocmdPattern | readonly AutocmdPattern [ ] ,
8182 options : RemoveOptions = { } ,
8283) : Promise < void > {
8384 const expr = buildRemoveExpr ( event , pat , options ) ;
@@ -109,7 +110,7 @@ export async function remove(
109110export async function list (
110111 denops : Denops ,
111112 event ?: "*" | AutocmdEvent | readonly AutocmdEvent [ ] ,
112- pat ?: string | readonly string [ ] ,
113+ pat ?: AutocmdPattern | readonly AutocmdPattern [ ] ,
113114 options : ListOptions = { } ,
114115) : Promise < unknown > {
115116 const terms = [ "au" ] ;
@@ -126,7 +127,7 @@ export async function list(
126127 if ( Array . isArray ( pat ) ) {
127128 terms . push ( pat . join ( "," ) ) ;
128129 } else {
129- terms . push ( pat as string ) ;
130+ terms . push ( pat as AutocmdPattern ) ;
130131 }
131132 }
132133 }
0 commit comments