Skip to content
Snippets Groups Projects
Unverified Commit a228d1dd authored by Johann150's avatar Johann150
Browse files

fix lint @typescript-eslint/ban-types

parent d748ba2c
No related branches found
No related tags found
No related merge requests found
......@@ -13,9 +13,6 @@ const props = defineProps<{
router?: Router;
}>();
const emit = defineEmits<{
}>();
const router = props.router ?? inject('router');
if (router == null) {
......
......@@ -13,8 +13,6 @@
import { onMounted, ref, watch, PropType, onBeforeUnmount } from 'vue';
import tinycolor from 'tinycolor2';
const props = defineProps<{}>();
const loaded = !!window.TagCanvas;
const SAFE_FOR_HTML_ID = 'abcdefghijklmnopqrstuvwxyz';
const computedStyle = getComputedStyle(document.documentElement);
......
......@@ -8,7 +8,7 @@ export class Autocomplete {
x: Ref<number>;
y: Ref<number>;
q: Ref<string | null>;
close: Function;
close: () => void;
} | null;
private textarea: HTMLInputElement | HTMLTextAreaElement;
private currentType: string;
......
import keyCode from './keycode';
type Keymap = Record<string, Function>;
type Callback = (ev: KeyboardEvent) => void;
type Keymap = Record<string, Callback>;
type Pattern = {
which: string[];
......@@ -11,14 +13,14 @@ type Pattern = {
type Action = {
patterns: Pattern[];
callback: Function;
callback: Callback;
allowRepeat: boolean;
};
const parseKeymap = (keymap: Keymap) => Object.entries(keymap).map(([patterns, callback]): Action => {
const result = {
patterns: [],
callback: callback,
callback,
allowRepeat: true
} as Action;
......
export function query(obj: {}): string {
export function query(obj: Record<string, any>): string {
const params = Object.entries(obj)
.filter(([, v]) => Array.isArray(v) ? v.length : v !== undefined)
.reduce((a, [k, v]) => (a[k] = v, a), {} as Record<string, any>);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment