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:
Daniel
2023-02-24 16:40:37 +01:00
committed by GitHub
parent 1914a61edd
commit 96fd1cf73b
57 changed files with 117 additions and 47 deletions

View File

@@ -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',

View File

@@ -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;

View File

@@ -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();

View File

@@ -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

View File

@@ -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) {

View File

@@ -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[] = [];

View File

@@ -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) {

View File

@@ -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;

View File

@@ -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[] = [];

View File

@@ -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

View File

@@ -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);

View File

@@ -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,

View File

@@ -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);