@@ -63,7 +63,7 @@ export interface Decoration {
63
63
export function decorate (
64
64
denops : Denops ,
65
65
bufnr : number ,
66
- decorations : Decoration [ ] ,
66
+ decorations : readonly Decoration [ ] ,
67
67
) : Promise < void > {
68
68
switch ( denops . meta . host ) {
69
69
case "vim" :
@@ -133,14 +133,14 @@ export function undecorate(
133
133
}
134
134
}
135
135
136
- function uniq < T > ( array : T [ ] ) : T [ ] {
136
+ function uniq < T > ( array : readonly T [ ] ) : T [ ] {
137
137
return [ ...new Set ( array ) ] ;
138
138
}
139
139
140
140
async function vimDecorate (
141
141
denops : Denops ,
142
142
bufnr : number ,
143
- decorations : Decoration [ ] ,
143
+ decorations : readonly Decoration [ ] ,
144
144
) : Promise < void > {
145
145
const toPropType = ( n : string ) => `${ prefix } :${ n } ` ;
146
146
const rs = ( denops . context [ cacheKey ] ?? new Set ( ) ) as Set < string > ;
@@ -195,7 +195,7 @@ async function vimUndecorate(
195
195
async function nvimDecorate (
196
196
denops : Denops ,
197
197
bufnr : number ,
198
- decorations : Decoration [ ] ,
198
+ decorations : readonly Decoration [ ] ,
199
199
) : Promise < void > {
200
200
const ns = await nvimFn . nvim_create_namespace ( denops , prefix ) ;
201
201
for ( const chunk of itertools . chunked ( decorations , 1000 ) ) {
0 commit comments