@@ -41,8 +41,8 @@ import { buildDefineExpr, buildRemoveExpr } from "./_utils.ts";
41
41
*/
42
42
export async function define (
43
43
denops : Denops ,
44
- event : AutocmdEvent | AutocmdEvent [ ] ,
45
- pat : string | string [ ] ,
44
+ event : AutocmdEvent | readonly AutocmdEvent [ ] ,
45
+ pat : string | readonly string [ ] ,
46
46
cmd : string ,
47
47
options : DefineOptions = { } ,
48
48
) : Promise < void > {
@@ -76,8 +76,8 @@ export async function define(
76
76
*/
77
77
export async function remove (
78
78
denops : Denops ,
79
- event ?: "*" | AutocmdEvent | AutocmdEvent [ ] ,
80
- pat ?: string | string [ ] ,
79
+ event ?: "*" | AutocmdEvent | readonly AutocmdEvent [ ] ,
80
+ pat ?: string | readonly string [ ] ,
81
81
options : RemoveOptions = { } ,
82
82
) : Promise < void > {
83
83
const expr = buildRemoveExpr ( event , pat , options ) ;
@@ -108,8 +108,8 @@ export async function remove(
108
108
*/
109
109
export async function list (
110
110
denops : Denops ,
111
- event ?: "*" | AutocmdEvent | AutocmdEvent [ ] ,
112
- pat ?: string | string [ ] ,
111
+ event ?: "*" | AutocmdEvent | readonly AutocmdEvent [ ] ,
112
+ pat ?: string | readonly string [ ] ,
113
113
options : ListOptions = { } ,
114
114
) : Promise < unknown > {
115
115
const terms = [ "au" ] ;
@@ -120,13 +120,13 @@ export async function list(
120
120
if ( Array . isArray ( event ) ) {
121
121
terms . push ( event . join ( "," ) ) ;
122
122
} else {
123
- terms . push ( event ) ;
123
+ terms . push ( event as AutocmdEvent ) ;
124
124
}
125
125
if ( pat ) {
126
126
if ( Array . isArray ( pat ) ) {
127
127
terms . push ( pat . join ( "," ) ) ;
128
128
} else {
129
- terms . push ( pat ) ;
129
+ terms . push ( pat as string ) ;
130
130
}
131
131
}
132
132
}
@@ -155,7 +155,7 @@ export async function list(
155
155
*/
156
156
export async function emit (
157
157
denops : Denops ,
158
- event : AutocmdEvent | AutocmdEvent [ ] ,
158
+ event : AutocmdEvent | readonly AutocmdEvent [ ] ,
159
159
fname ?: string ,
160
160
options : EmitOptions = { } ,
161
161
) : Promise < unknown > {
@@ -169,7 +169,7 @@ export async function emit(
169
169
if ( Array . isArray ( event ) ) {
170
170
terms . push ( event . join ( "," ) ) ;
171
171
} else {
172
- terms . push ( event ) ;
172
+ terms . push ( event as AutocmdEvent ) ;
173
173
}
174
174
if ( fname ) {
175
175
terms . push ( fname ) ;
@@ -199,7 +199,7 @@ export async function emit(
199
199
*/
200
200
export async function emitAll (
201
201
denops : Denops ,
202
- event : AutocmdEvent | AutocmdEvent [ ] ,
202
+ event : AutocmdEvent | readonly AutocmdEvent [ ] ,
203
203
fname ?: string ,
204
204
options : EmitOptions = { } ,
205
205
) : Promise < unknown > {
@@ -213,7 +213,7 @@ export async function emitAll(
213
213
if ( Array . isArray ( event ) ) {
214
214
terms . push ( event . join ( "," ) ) ;
215
215
} else {
216
- terms . push ( event ) ;
216
+ terms . push ( event as AutocmdEvent ) ;
217
217
}
218
218
if ( fname ) {
219
219
terms . push ( fname ) ;
0 commit comments