Prefer import type
when importing types
This commit is contained in:
parent
0f635af8a9
commit
74fde10ff5
721 changed files with 2037 additions and 1947 deletions
|
@ -3,7 +3,8 @@
|
|||
|
||||
import { assert } from 'chai';
|
||||
import * as sinon from 'sinon';
|
||||
import { BrowserWindow, MenuItem, Tray, nativeImage } from 'electron';
|
||||
import type { MenuItem } from 'electron';
|
||||
import { BrowserWindow, Tray, nativeImage } from 'electron';
|
||||
import * as path from 'path';
|
||||
|
||||
import { SystemTrayService } from '../../../app/SystemTrayService';
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
import { assert } from 'chai';
|
||||
import * as sinon from 'sinon';
|
||||
import { MainSQL } from '../../sql/main';
|
||||
import type { MainSQL } from '../../sql/main';
|
||||
import { SystemTraySetting } from '../../types/SystemTraySetting';
|
||||
|
||||
import type { ConfigType } from '../../../app/base_config';
|
||||
|
|
|
@ -7,10 +7,8 @@ import { RowType } from '../../../components/ConversationList';
|
|||
import { FindDirection } from '../../../components/leftPane/LeftPaneHelper';
|
||||
import { getDefaultConversation } from '../../../test-both/helpers/getDefaultConversation';
|
||||
|
||||
import {
|
||||
LeftPaneInboxHelper,
|
||||
LeftPaneInboxPropsType,
|
||||
} from '../../../components/leftPane/LeftPaneInboxHelper';
|
||||
import type { LeftPaneInboxPropsType } from '../../../components/leftPane/LeftPaneInboxHelper';
|
||||
import { LeftPaneInboxHelper } from '../../../components/leftPane/LeftPaneInboxHelper';
|
||||
|
||||
describe('LeftPaneInboxHelper', () => {
|
||||
const defaultProps: LeftPaneInboxPropsType = {
|
||||
|
|
|
@ -2,10 +2,8 @@
|
|||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { assert } from 'chai';
|
||||
import {
|
||||
FindDirection,
|
||||
ToFindType,
|
||||
} from '../../../components/leftPane/LeftPaneHelper';
|
||||
import type { ToFindType } from '../../../components/leftPane/LeftPaneHelper';
|
||||
import { FindDirection } from '../../../components/leftPane/LeftPaneHelper';
|
||||
import { getDefaultConversation } from '../../../test-both/helpers/getDefaultConversation';
|
||||
|
||||
import { getConversationInDirection } from '../../../components/leftPane/getConversationInDirection';
|
||||
|
|
|
@ -5,11 +5,9 @@ import { assert } from 'chai';
|
|||
import { shuffle } from 'lodash';
|
||||
|
||||
import { IMAGE_JPEG } from '../../../types/MIME';
|
||||
import {
|
||||
groupMediaItemsByDate,
|
||||
Section,
|
||||
} from '../../../components/conversation/media-gallery/groupMediaItemsByDate';
|
||||
import { MediaItemType } from '../../../types/MediaItem';
|
||||
import type { Section } from '../../../components/conversation/media-gallery/groupMediaItemsByDate';
|
||||
import { groupMediaItemsByDate } from '../../../components/conversation/media-gallery/groupMediaItemsByDate';
|
||||
import type { MediaItemType } from '../../../types/MediaItem';
|
||||
import { fakeAttachment } from '../../../test-both/helpers/fakeAttachment';
|
||||
|
||||
const testDate = (
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
import { assert } from 'chai';
|
||||
import * as sinon from 'sinon';
|
||||
import { noop } from 'lodash';
|
||||
import { StoredJob } from '../../jobs/types';
|
||||
import type { StoredJob } from '../../jobs/types';
|
||||
|
||||
import { JobQueueDatabaseStore } from '../../jobs/JobQueueDatabaseStore';
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ import { assertRejects } from '../helpers';
|
|||
import type { LoggerType } from '../../types/Logging';
|
||||
|
||||
import { JobQueue } from '../../jobs/JobQueue';
|
||||
import { ParsedJob, StoredJob, JobQueueStore } from '../../jobs/types';
|
||||
import type { ParsedJob, StoredJob, JobQueueStore } from '../../jobs/types';
|
||||
|
||||
describe('JobQueue', () => {
|
||||
describe('end-to-end tests', () => {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
import EventEmitter, { once } from 'events';
|
||||
|
||||
import { JobQueueStore, StoredJob } from '../../jobs/types';
|
||||
import type { JobQueueStore, StoredJob } from '../../jobs/types';
|
||||
import { sleep } from '../../util/sleep';
|
||||
|
||||
export class TestJobQueueStore implements JobQueueStore {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
import { assert } from 'chai';
|
||||
|
||||
import { ConversationType } from '../../state/ducks/conversations';
|
||||
import type { ConversationType } from '../../state/ducks/conversations';
|
||||
import { MemberRepository } from '../../quill/memberRepository';
|
||||
import { getDefaultConversation } from '../../test-both/helpers/getDefaultConversation';
|
||||
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { assert } from 'chai';
|
||||
import { RefObject } from 'react';
|
||||
import type { RefObject } from 'react';
|
||||
import Delta from 'quill-delta';
|
||||
|
||||
import { matchMention } from '../../../quill/mentions/matchers';
|
||||
import { MemberRepository } from '../../../quill/memberRepository';
|
||||
import { ConversationType } from '../../../state/ducks/conversations';
|
||||
import type { ConversationType } from '../../../state/ducks/conversations';
|
||||
import { getDefaultConversation } from '../../../test-both/helpers/getDefaultConversation';
|
||||
|
||||
class FakeTokenList<T> extends Array<T> {
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { assert } from 'chai';
|
||||
import SQL, { Database } from 'better-sqlite3';
|
||||
import type { Database } from 'better-sqlite3';
|
||||
import SQL from 'better-sqlite3';
|
||||
import { v4 as generateGuid } from 'uuid';
|
||||
|
||||
import { SCHEMA_VERSIONS } from '../sql/Server';
|
||||
|
|
|
@ -5,11 +5,9 @@ import { assert } from 'chai';
|
|||
import * as sinon from 'sinon';
|
||||
|
||||
import { IMAGE_GIF, IMAGE_PNG } from '../../types/MIME';
|
||||
import { MessageAttributesType } from '../../model-types.d';
|
||||
import type { MessageAttributesType } from '../../model-types.d';
|
||||
import type { Avatar, Email, Phone } from '../../types/EmbeddedContact';
|
||||
import {
|
||||
Avatar,
|
||||
Email,
|
||||
Phone,
|
||||
_validate,
|
||||
embeddedContactSelector,
|
||||
getName,
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
import { assert } from 'chai';
|
||||
|
||||
import * as Message from '../../../types/message/initializeAttachmentMetadata';
|
||||
import { IncomingMessage } from '../../../types/Message';
|
||||
import type { IncomingMessage } from '../../../types/Message';
|
||||
import { SignalService } from '../../../protobuf';
|
||||
import * as MIME from '../../../types/MIME';
|
||||
import * as Bytes from '../../../Bytes';
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
import { assert } from 'chai';
|
||||
import Sinon from 'sinon';
|
||||
import { LoggerType } from '../../types/Logging';
|
||||
import type { LoggerType } from '../../types/Logging';
|
||||
|
||||
import {
|
||||
isSgnlHref,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import * as sinon from 'sinon';
|
||||
import { BrowserWindow } from 'electron';
|
||||
import type { BrowserWindow } from 'electron';
|
||||
|
||||
import { toggleMaximizedBrowserWindow } from '../../util/toggleMaximizedBrowserWindow';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue