style: use shorter array type declarations
This commit is contained in:
parent
6ecba14f6f
commit
014451ffa0
3 changed files with 4 additions and 4 deletions
|
@ -3,12 +3,12 @@ import { ref, onMounted } from "vue";
|
||||||
import { debounce } from "@/helpers";
|
import { debounce } from "@/helpers";
|
||||||
|
|
||||||
const activeImage = ref(0);
|
const activeImage = ref(0);
|
||||||
const images = ref<Array<Element>>([]);
|
const images = ref<Element[]>([]);
|
||||||
const element = document.createElement("div");
|
const element = document.createElement("div");
|
||||||
const galleryViewport = ref<HTMLElement>(element);
|
const galleryViewport = ref<HTMLElement>(element);
|
||||||
const galleryItemWidth = ref<number>(1);
|
const galleryItemWidth = ref<number>(1);
|
||||||
|
|
||||||
const resizeObserverCallback = (entries: Array<ResizeObserverEntry>): void => {
|
const resizeObserverCallback = (entries: ResizeObserverEntry[]): void => {
|
||||||
for (const entry of entries) {
|
for (const entry of entries) {
|
||||||
galleryItemWidth.value = entry.contentRect.width;
|
galleryItemWidth.value = entry.contentRect.width;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
const debounce = (fn: Function, delay: number = 300): any => {
|
const debounce = (fn: Function, delay: number = 300): any => {
|
||||||
let timer = 0;
|
let timer = 0;
|
||||||
const debounced = (...args: Array<any>): void => {
|
const debounced = (...args: any[]): void => {
|
||||||
if (!args) args = [];
|
if (!args) args = [];
|
||||||
clearTimeout(timer);
|
clearTimeout(timer);
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ const nsfwData = [
|
||||||
];
|
];
|
||||||
|
|
||||||
const kinksHeadings = ["Kink", "Receive", "Give"];
|
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 receive = kink.receive ? "✅" : "🚫";
|
||||||
const give = kink.give ? "✅" : "🚫";
|
const give = kink.give ? "✅" : "🚫";
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue