mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-07-19 18:21:54 +00:00
Add import type whenever possible
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { ActiveElement, ChartEvent, ChartType, TooltipItem } from 'chart.js';
|
||||
import type { ActiveElement, ChartEvent, ChartType, TooltipItem } from 'chart.js';
|
||||
import { prettify } from './numbers';
|
||||
|
||||
export const pointerOnHover = ({ native }: ChartEvent, [firstElement]: ActiveElement[]) => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { format, formatISO, isBefore, isEqual, isWithinInterval, parse, parseISO as stdParseISO } from 'date-fns';
|
||||
import { OptionalString } from '../utils';
|
||||
import type { OptionalString } from '../utils';
|
||||
|
||||
export const STANDARD_DATE_FORMAT = 'yyyy-MM-dd';
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { subDays, startOfDay, endOfDay } from 'date-fns';
|
||||
import { cond, filter, isEmpty, T } from 'ramda';
|
||||
import { dateOrNull, DateOrString, formatInternational, isBeforeOrEqual, now, parseISO } from './date';
|
||||
import type { DateOrString } from './date';
|
||||
import { dateOrNull, formatInternational, isBeforeOrEqual, now, parseISO } from './date';
|
||||
import { equals } from '../utils';
|
||||
|
||||
export interface DateRange {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { isReachableServer, SelectedServer } from '../../servers/data';
|
||||
import { SemVerPattern, versionMatch } from './version';
|
||||
import type { SelectedServer } from '../../servers/data';
|
||||
import { isReachableServer } from '../../servers/data';
|
||||
import type { SemVerPattern } from './version';
|
||||
import { versionMatch } from './version';
|
||||
|
||||
const serverMatchesMinVersion = (minVersion: SemVerPattern) => (selectedServer: SelectedServer): boolean =>
|
||||
isReachableServer(selectedServer) && versionMatch(selectedServer.version, { minVersion });
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { DependencyList, EffectCallback, useEffect, useRef, useState } from 'react';
|
||||
import type { DependencyList, EffectCallback } from 'react';
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
import { useSwipeable as useReactSwipeable } from 'react-swipeable';
|
||||
import { useLocation, useNavigate } from 'react-router-dom';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { createAsyncThunk as baseCreateAsyncThunk, AsyncThunkPayloadCreator } from '@reduxjs/toolkit';
|
||||
import type { AsyncThunkPayloadCreator } from '@reduxjs/toolkit';
|
||||
import { createAsyncThunk as baseCreateAsyncThunk } from '@reduxjs/toolkit';
|
||||
import { identity } from 'ramda';
|
||||
import { ShlinkState } from '../../container/types';
|
||||
import type { ShlinkState } from '../../container/types';
|
||||
|
||||
export const createAsyncThunk = <Returned, ThunkArg>(
|
||||
typePrefix: string,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { compare } from 'compare-versions';
|
||||
import { identity, memoizeWith } from 'ramda';
|
||||
import { Empty, hasValue } from '../utils';
|
||||
import type { Empty } from '../utils';
|
||||
import { hasValue } from '../utils';
|
||||
|
||||
type SemVerPatternFragment = `${bigint | '*'}`;
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import bowser from 'bowser';
|
||||
import { zipObj } from 'ramda';
|
||||
import { Empty, hasValue } from '../utils';
|
||||
import { Stats, UserAgent } from '../../visits/types';
|
||||
import type { Empty } from '../utils';
|
||||
import { hasValue } from '../utils';
|
||||
import type { Stats, UserAgent } from '../../visits/types';
|
||||
|
||||
const DEFAULT = 'Others';
|
||||
const BROWSERS_WHITELIST = [
|
||||
|
||||
Reference in New Issue
Block a user