Skip to content

Commit

Permalink
Don't use private keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
Shougo committed Jan 3, 2024
1 parent b981315 commit 39d169b
Show file tree
Hide file tree
Showing 3 changed files with 336 additions and 333 deletions.
16 changes: 8 additions & 8 deletions denops/ddu/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,13 +317,13 @@ class Custom {
}

export class ContextBuilder {
private custom: Custom = new Custom();
#custom: Custom = new Custom();

async get(
denops: Denops,
options: UserOptions,
): Promise<[Context, DduOptions]> {
const userOptions = this.custom.get(options);
const userOptions = this.#custom.get(options);

await this.validate(denops, "options", userOptions, defaultDduOptions());
for (const key in userOptions.sourceOptions) {
Expand Down Expand Up @@ -365,24 +365,24 @@ export class ContextBuilder {
}

getGlobal(): Partial<DduOptions> {
return this.custom.global;
return this.#custom.global;
}
getLocal(): Record<string, Partial<DduOptions>> {
return this.custom.local;
return this.#custom.local;
}

setGlobal(options: Partial<DduOptions>) {
this.custom.setGlobal(options);
this.#custom.setGlobal(options);
}
setLocal(name: string, options: Partial<DduOptions>) {
this.custom.setLocal(name, options);
this.#custom.setLocal(name, options);
}

patchGlobal(options: Partial<DduOptions>) {
this.custom.patchGlobal(options);
this.#custom.patchGlobal(options);
}
patchLocal(name: string, options: Partial<DduOptions>) {
this.custom.patchLocal(name, options);
this.#custom.patchLocal(name, options);
}
}

Expand Down
Loading

0 comments on commit 39d169b

Please sign in to comment.