style: use shorter array type declarations

This commit is contained in:
Sebin Nyshkim 2023-01-22 16:55:09 +01:00
parent 6ecba14f6f
commit 014451ffa0
3 changed files with 4 additions and 4 deletions

View file

@ -3,12 +3,12 @@ import { ref, onMounted } from "vue";
import { debounce } from "@/helpers";
const activeImage = ref(0);
const images = ref<Array<Element>>([]);
const images = ref<Element[]>([]);
const element = document.createElement("div");
const galleryViewport = ref<HTMLElement>(element);
const galleryItemWidth = ref<number>(1);
const resizeObserverCallback = (entries: Array<ResizeObserverEntry>): void => {
const resizeObserverCallback = (entries: ResizeObserverEntry[]): void => {
for (const entry of entries) {
galleryItemWidth.value = entry.contentRect.width;
}

View file

@ -1,6 +1,6 @@
const debounce = (fn: Function, delay: number = 300): any => {
let timer = 0;
const debounced = (...args: Array<any>): void => {
const debounced = (...args: any[]): void => {
if (!args) args = [];
clearTimeout(timer);

View file

@ -44,7 +44,7 @@ const nsfwData = [
];
const kinksHeadings = ["Kink", "Receive", "Give"];
const kinksData = kinks.map((kink: Kink): Array<string> => {
const kinksData = kinks.map((kink: Kink): string[] => {
const receive = kink.receive ? "✅" : "🚫";
const give = kink.give ? "✅" : "🚫";