Skip to content

Commit

Permalink
chore: ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Jambo2018 committed Nov 29, 2023
1 parent 66c591e commit 608418e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default class TypingAsstPlugin extends Plugin {
const lineContent = editor.getLine(cursor.line);
editor.setLine(cursor.line, lineContent.replace(/^.*?\s/, ""));
}
(this.app as any).commands.executeCommandById(CMD_CONFIG[content].cmd);
(this.app as any).commands.executeCommandById((CMD_CONFIG as any)[content].cmd);
if (content === "set-link") {
view.editor.focus();
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/plugin-setting.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// import ExamplePlugin from "./main";
import TypingAsstPlugin from "main";
import { App, Editor, Notice, PluginSettingTab, Setting, setIcon } from "obsidian";
import { App, PluginSettingTab, Setting, setIcon } from "obsidian";
import Sortable from "sortablejs";
import { CMD_CONFIG, HEADING_MENU } from "src/constants";

Expand Down
2 changes: 1 addition & 1 deletion src/components/selection-menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class SelectionBtns {
if (idx === 0) {
btn.createSpan(TEXT_MAP["text"]);
} else {
setIcon(btn, CMD_CONFIG[item].icon);
setIcon(btn, (CMD_CONFIG as any)[item].icon);
}
btn.onclick = function (e) {
if (idx === 0) {
Expand Down

0 comments on commit 608418e

Please sign in to comment.