Skip to content

Commit

Permalink
Params設定できる方がね
Browse files Browse the repository at this point in the history
  • Loading branch information
kuuote committed Jun 9, 2024
1 parent c760aee commit 34dcd7e
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions denops/@ddu-filters/template.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
import { BaseFilter, DduItem, FilterArguments } from "../@deps/ddu.ts";

type Never = Record<PropertyKey, never>;
const params = {
_: null,
};

export class Filter extends BaseFilter<Never> {
filter(args: FilterArguments<Never>): Promise<DduItem[]> {
type Params = typeof params;
// type Params = Record<PropertyKey, never>;

export class Filter extends BaseFilter<Params> {
filter(args: FilterArguments<Params>): Promise<DduItem[]> {
return Promise.resolve(args.items);
}

params(): Never {
return {};
params(): Params {
return params;
// return {};
}
}

0 comments on commit 34dcd7e

Please sign in to comment.