mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-02-27 20:26:40 +00:00
Add import type whenever possible
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { isInvalidArgumentError } from './utils';
|
||||
import { ProblemDetailsError } from './types/errors';
|
||||
import type { ProblemDetailsError } from './types/errors';
|
||||
|
||||
export interface ShlinkApiErrorProps {
|
||||
errorData?: ProblemDetailsError;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { isEmpty, isNil, reject } from 'ramda';
|
||||
import { ShortUrl, ShortUrlData } from '../../short-urls/data';
|
||||
import { OptionalString } from '../../utils/utils';
|
||||
import {
|
||||
import type { ShortUrl, ShortUrlData } from '../../short-urls/data';
|
||||
import type { OptionalString } from '../../utils/utils';
|
||||
import type {
|
||||
ShlinkHealth,
|
||||
ShlinkMercureInfo,
|
||||
ShlinkShortUrlsResponse,
|
||||
@@ -20,7 +20,7 @@ import {
|
||||
import { orderToString } from '../../utils/helpers/ordering';
|
||||
import { isRegularNotFound, parseApiError } from '../utils';
|
||||
import { stringifyQuery } from '../../utils/helpers/query';
|
||||
import { HttpClient } from '../../common/services/HttpClient';
|
||||
import type { HttpClient } from '../../common/services/HttpClient';
|
||||
|
||||
const buildShlinkBaseUrl = (url: string, version: 2 | 3) => `${url}/rest/v${version}`;
|
||||
const rejectNilProps = reject(isNil);
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { hasServerData, ServerWithId } from '../../servers/data';
|
||||
import { GetState } from '../../container/types';
|
||||
import type { ServerWithId } from '../../servers/data';
|
||||
import { hasServerData } from '../../servers/data';
|
||||
import type { GetState } from '../../container/types';
|
||||
import { ShlinkApiClient } from './ShlinkApiClient';
|
||||
import { HttpClient } from '../../common/services/HttpClient';
|
||||
import type { HttpClient } from '../../common/services/HttpClient';
|
||||
|
||||
const apiClients: Record<string, ShlinkApiClient> = {};
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Bottle from 'bottlejs';
|
||||
import type Bottle from 'bottlejs';
|
||||
import { buildShlinkApiClient } from './ShlinkApiClientBuilder';
|
||||
|
||||
const provideServices = (bottle: Bottle) => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Visit } from '../../visits/types';
|
||||
import { OptionalString } from '../../utils/utils';
|
||||
import { ShortUrl, ShortUrlMeta } from '../../short-urls/data';
|
||||
import { Order } from '../../utils/helpers/ordering';
|
||||
import type { Visit } from '../../visits/types';
|
||||
import type { OptionalString } from '../../utils/utils';
|
||||
import type { ShortUrl, ShortUrlMeta } from '../../short-urls/data';
|
||||
import type { Order } from '../../utils/helpers/ordering';
|
||||
|
||||
export interface ShlinkShortUrlsResponse {
|
||||
data: ShortUrl[];
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import {
|
||||
ErrorTypeV2,
|
||||
ErrorTypeV3,
|
||||
import type {
|
||||
InvalidArgumentError,
|
||||
InvalidShortUrlDeletion,
|
||||
ProblemDetailsError,
|
||||
RegularNotFound,
|
||||
RegularNotFound } from '../types/errors';
|
||||
import {
|
||||
ErrorTypeV2,
|
||||
ErrorTypeV3,
|
||||
} from '../types/errors';
|
||||
|
||||
const isProblemDetails = (e: unknown): e is ProblemDetailsError =>
|
||||
|
||||
Reference in New Issue
Block a user