Skip to content

Commit

Permalink
fix: Expose loader to Source.onInit
Browse files Browse the repository at this point in the history
  • Loading branch information
4513ECHO committed Jun 22, 2023
1 parent f5ea0cd commit d4788f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions denops/ddu/base/source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export type OnInitArguments<Params extends BaseSourceParams> = {
denops: Denops;
sourceOptions: SourceOptions;
sourceParams: Params;
loader: Loader;
};

export type OnEventArguments<Params extends BaseSourceParams> = {
Expand Down
3 changes: 3 additions & 0 deletions denops/ddu/ddu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ export class Ddu {
source,
sourceOptions,
sourceParams,
this.loader,
);
}

Expand Down Expand Up @@ -1930,6 +1931,7 @@ async function initSource<
source: BaseSource<Params, UserData>,
sourceOptions: SourceOptions,
sourceParams: Params,
loader: Loader,
): Promise<void> {
if (!source) {
return;
Expand All @@ -1940,6 +1942,7 @@ async function initSource<
denops,
sourceOptions,
sourceParams,
loader,
});
source.isInitialized = true;
}
Expand Down

0 comments on commit d4788f8

Please sign in to comment.