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;
|
return this.inputEl.value;
|
||||||
}
|
}
|
||||||
private get hiddenChooser() {
|
private get hiddenChooser() {
|
||||||
const chooser = (
|
interface WithChooser {
|
||||||
this as unknown as {
|
chooser: {
|
||||||
chooser: {
|
selectedItem: number | null;
|
||||||
selectedItem: number | null;
|
values:
|
||||||
values: { item: TFile }[] | null;
|
| {
|
||||||
suggestions: unknown[];
|
item: TFile;
|
||||||
};
|
}[]
|
||||||
}
|
| null;
|
||||||
).chooser;
|
suggestions: unknown[];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
const chooser = (this as unknown as WithChooser).chooser;
|
||||||
return chooser;
|
return chooser;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue