Prefer import type when importing types

This commit is contained in:
Evan Hahn 2021-10-26 14:15:33 -05:00 committed by GitHub
parent 0f635af8a9
commit 74fde10ff5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
721 changed files with 2037 additions and 1947 deletions

View file

@ -4,13 +4,12 @@
import { assert } from 'chai';
import { actions } from '../../../state/ducks/audioPlayer';
import {
actions as conversationsActions,
SwitchToAssociatedViewActionType,
} from '../../../state/ducks/conversations';
import type { SwitchToAssociatedViewActionType } from '../../../state/ducks/conversations';
import { actions as conversationsActions } from '../../../state/ducks/conversations';
import { noopAction } from '../../../state/ducks/noop';
import { StateType, reducer as rootReducer } from '../../../state/reducer';
import type { StateType } from '../../../state/reducer';
import { reducer as rootReducer } from '../../../state/reducer';
const { messageDeleted, messageChanged } = conversationsActions;

View file

@ -9,7 +9,7 @@ import { noopAction } from '../../../state/ducks/noop';
import { reducer as rootReducer } from '../../../state/reducer';
import { IMAGE_JPEG } from '../../../types/MIME';
import { AttachmentType } from '../../../types/Attachment';
import type { AttachmentType } from '../../../types/Attachment';
import { fakeAttachment } from '../../helpers/fakeAttachment';
describe('both/state/ducks/composer', () => {

View file

@ -8,7 +8,7 @@ import {
getEmptyState,
reducer,
} from '../../../state/ducks/linkPreviews';
import { LinkPreviewType } from '../../../types/message/LinkPreviews';
import type { LinkPreviewType } from '../../../types/message/LinkPreviews';
describe('both/state/ducks/linkPreviews', () => {
function getMockLinkPreview(): LinkPreviewType {

View file

@ -3,11 +3,12 @@
import { assert } from 'chai';
import * as sinon from 'sinon';
import { StateType, reducer as rootReducer } from '../../../state/reducer';
import type { StateType } from '../../../state/reducer';
import { reducer as rootReducer } from '../../../state/reducer';
import { noopAction } from '../../../state/ducks/noop';
import type { PreferredReactionsStateType } from '../../../state/ducks/preferredReactions';
import {
PreferredReactionsStateType,
actions,
getInitialState,
reducer,

View file

@ -3,11 +3,13 @@
import { assert } from 'chai';
import type {
ConversationLookupType,
ConversationType,
} from '../../../state/ducks/conversations';
import {
OneTimeModalState,
ComposerStep,
ConversationLookupType,
ConversationType,
getEmptyState,
} from '../../../state/ducks/conversations';
import {
@ -43,7 +45,8 @@ import {
isCreatingGroup,
} from '../../../state/selectors/conversations';
import { noopAction } from '../../../state/ducks/noop';
import { StateType, reducer as rootReducer } from '../../../state/reducer';
import type { StateType } from '../../../state/reducer';
import { reducer as rootReducer } from '../../../state/reducer';
import { setupI18n } from '../../../util/setupI18n';
import enMessages from '../../../../_locales/en/messages.json';
import { getDefaultConversation } from '../../helpers/getDefaultConversation';

View file

@ -4,16 +4,14 @@
import { assert } from 'chai';
import sinon from 'sinon';
import {
import type {
ConversationType,
getEmptyState as getEmptyConversationState,
MessageType,
} from '../../../state/ducks/conversations';
import { getEmptyState as getEmptyConversationState } from '../../../state/ducks/conversations';
import { noopAction } from '../../../state/ducks/noop';
import {
getEmptyState as getEmptySearchState,
MessageSearchResultType,
} from '../../../state/ducks/search';
import type { MessageSearchResultType } from '../../../state/ducks/search';
import { getEmptyState as getEmptySearchState } from '../../../state/ducks/search';
import { getEmptyState as getEmptyUserState } from '../../../state/ducks/user';
import {
getIsSearchingInAConversation,
@ -24,7 +22,8 @@ import { makeLookup } from '../../../util/makeLookup';
import { getDefaultConversation } from '../../helpers/getDefaultConversation';
import { ReadStatus } from '../../../messages/MessageReadStatus';
import { StateType, reducer as rootReducer } from '../../../state/reducer';
import type { StateType } from '../../../state/reducer';
import { reducer as rootReducer } from '../../../state/reducer';
describe('both/state/selectors/search', () => {
const NOW = 1_000_000;