remove manually created typing d ts file (#249)
* Rename file ".d.ts" files are files that are automatically generated during compilation (in case option is set) and shouldn't be created manually. * Export types and interfaces * Add missing imports
This commit is contained in:
@@ -27,6 +27,7 @@ import { NavbarToolbar } from 'components/navbar/DefaultNavBar';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { BACK } from 'util/useBackTo';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { IChapter, IQueue } from 'typings';
|
||||
|
||||
const initialQueue = {
|
||||
status: 'Stopped',
|
||||
|
||||
@@ -21,6 +21,7 @@ import AppbarSearch from 'components/util/AppbarSearch';
|
||||
import { useQueryParam, StringParam } from 'use-query-params';
|
||||
import { Virtuoso } from 'react-virtuoso';
|
||||
import { Typography, useMediaQuery, useTheme } from '@mui/material';
|
||||
import { IExtension } from 'typings';
|
||||
|
||||
const LANGUAGE = 0;
|
||||
const EXTENSIONS = 1;
|
||||
|
||||
@@ -18,6 +18,7 @@ import { useQueryParam, NumberParam } from 'use-query-params';
|
||||
import { useQuery } from 'util/client';
|
||||
import UpdateChecker from 'components/library/UpdateChecker';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { ICategory, IManga } from 'typings';
|
||||
|
||||
export default function Library() {
|
||||
const { t } = useTranslation();
|
||||
|
||||
@@ -19,6 +19,7 @@ import LoadingPlaceholder from 'components/util/LoadingPlaceholder';
|
||||
import React, { useContext, useEffect, useRef } from 'react';
|
||||
import { useParams } from 'react-router-dom';
|
||||
import { useQuery } from 'util/client';
|
||||
import { IManga } from 'typings';
|
||||
|
||||
const AUTOFETCH_AGE = 60 * 60 * 24; // 24 hours
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ import {
|
||||
useDefaultReaderSettings,
|
||||
} from 'util/readerSettings';
|
||||
import makeToast from 'components/util/Toast';
|
||||
import { IChapter, IManga, IMangaCard, IPartialChapter, IReaderSettings, ReaderType } from 'typings';
|
||||
|
||||
const getReaderComponent = (readerType: ReaderType) => {
|
||||
switch (readerType) {
|
||||
|
||||
@@ -18,6 +18,7 @@ import { StringParam, useQueryParam } from 'use-query-params';
|
||||
import client from 'util/client';
|
||||
import { langCodeToName, langSortCmp, sourceDefualtLangs, sourceForcedDefaultLangs } from 'util/language';
|
||||
import useLocalStorage from 'util/useLocalStorage';
|
||||
import { ISource } from 'typings';
|
||||
|
||||
function sourceToLangList(sources: ISource[]) {
|
||||
const result: string[] = [];
|
||||
|
||||
@@ -15,6 +15,7 @@ import EditTextPreference from 'components/sourceConfiguration/EditTextPreferenc
|
||||
import MultiSelectListPreference from 'components/sourceConfiguration/MultiSelectListPreference';
|
||||
import List from '@mui/material/List';
|
||||
import cloneObject from 'util/cloneObject';
|
||||
import { SourcePreferences } from 'typings';
|
||||
|
||||
function getPrefComponent(type: string) {
|
||||
switch (type) {
|
||||
|
||||
@@ -17,6 +17,7 @@ import AppbarSearch from 'components/util/AppbarSearch';
|
||||
import { useQueryParam, StringParam } from 'use-query-params';
|
||||
import SourceGridLayout from 'components/source/GridLayouts';
|
||||
import { useLibraryOptionsContext } from 'components/context/LibraryOptionsContext';
|
||||
import { IManga, IMangaCard, ISource, ISourceFilters } from 'typings';
|
||||
|
||||
interface IPos {
|
||||
position: number;
|
||||
|
||||
@@ -16,6 +16,7 @@ import { IconButton } from '@mui/material';
|
||||
import TravelExploreIcon from '@mui/icons-material/TravelExplore';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { useQuery } from 'util/client';
|
||||
import { ISource } from 'typings';
|
||||
|
||||
function sourceToLangList(sources: ISource[]) {
|
||||
const result: string[] = [];
|
||||
|
||||
@@ -21,6 +21,7 @@ import React, { useContext, useEffect, useRef, useState } from 'react';
|
||||
import { Link, useHistory } from 'react-router-dom';
|
||||
import client from 'util/client';
|
||||
import useLocalStorage from 'util/useLocalStorage';
|
||||
import { IChapter, IMangaChapter, IQueue, PaginatedList } from 'typings';
|
||||
|
||||
function epochToDate(epoch: number) {
|
||||
const date = new Date(0); // The 0 there is the key, which sets the date to the epoch
|
||||
|
||||
@@ -6,6 +6,7 @@ import ListItemLink from 'components/util/ListItemLink';
|
||||
import NavbarContext from 'components/context/NavbarContext';
|
||||
import LoadingPlaceholder from 'components/util/LoadingPlaceholder';
|
||||
import { useQuery } from 'util/client';
|
||||
import { IAbout } from 'typings';
|
||||
|
||||
export default function About() {
|
||||
const { setTitle, setAction } = useContext(NavbarContext);
|
||||
|
||||
@@ -33,6 +33,7 @@ import Checkbox from '@mui/material/Checkbox';
|
||||
import FormControlLabel from '@mui/material/FormControlLabel';
|
||||
import NavbarContext from 'components/context/NavbarContext';
|
||||
import client, { useQuery } from 'util/client';
|
||||
import { ICategory } from 'typings';
|
||||
|
||||
const getItemStyle = (
|
||||
isDragging: boolean,
|
||||
|
||||
@@ -20,6 +20,7 @@ import {
|
||||
useDefaultReaderSettings,
|
||||
} from 'util/readerSettings';
|
||||
import ReaderSettingsOptions from 'components/reader/ReaderSettingsOptions';
|
||||
import { IReaderSettings } from 'typings';
|
||||
|
||||
export default function DefaultReaderSettings() {
|
||||
const { setTitle, setAction } = useContext(NavbarContext);
|
||||
|
||||
Reference in New Issue
Block a user