mirror of
https://github.com/d7sd6u/obsidian-crosslink-advanced.git
synced 2026-07-22 05:41:20 +00:00
refactor: move chooser type out
This commit is contained in:
parent
e1c09d282f
commit
c0949aed2c
1 changed files with 13 additions and 9 deletions
22
src/main.ts
22
src/main.ts
|
|
@ -458,15 +458,19 @@ export class FileAndDirChooser extends FuzzySuggestModal<TFile> {
|
|||
return this.inputEl.value;
|
||||
}
|
||||
private get hiddenChooser() {
|
||||
const chooser = (
|
||||
this as unknown as {
|
||||
chooser: {
|
||||
selectedItem: number | null;
|
||||
values: { item: TFile }[] | null;
|
||||
suggestions: unknown[];
|
||||
};
|
||||
}
|
||||
).chooser;
|
||||
interface WithChooser {
|
||||
chooser: {
|
||||
selectedItem: number | null;
|
||||
values:
|
||||
| {
|
||||
item: TFile;
|
||||
}[]
|
||||
| null;
|
||||
suggestions: unknown[];
|
||||
};
|
||||
}
|
||||
|
||||
const chooser = (this as unknown as WithChooser).chooser;
|
||||
return chooser;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue