style: restrict type import (#1589)

This commit is contained in:
Himself65
2023-03-15 11:58:43 -05:00
committed by GitHub
parent 6ab2f83e13
commit efcf1fcaa0
154 changed files with 332 additions and 307 deletions

View File

@@ -1,6 +1,6 @@
import { config } from '@affine/env';
import { BlockSuiteWorkspace, Provider } from '../shared';
import type { BlockSuiteWorkspace, Provider } from '../shared';
import {
createAffineWebSocketProvider,
createBroadCastChannelProvider,

View File

@@ -1,6 +1,7 @@
import { assertExists } from '@blocksuite/store';
import { AffineDownloadProvider, BlockSuiteWorkspace } from '../../../shared';
import type { AffineDownloadProvider } from '../../../shared';
import { BlockSuiteWorkspace } from '../../../shared';
import { apis } from '../../../shared/apis';
import { providerLogger } from '../../logger';

View File

@@ -1,18 +1,19 @@
import { assertExists } from '@blocksuite/store';
import type { Awareness } from 'y-protocols/awareness';
import {
applyAwarenessUpdate,
Awareness,
encodeAwarenessUpdate,
} from 'y-protocols/awareness';
import { BlockSuiteWorkspace, BroadCastChannelProvider } from '../../../shared';
import type { BroadCastChannelProvider } from '../../../shared';
import { BlockSuiteWorkspace } from '../../../shared';
import { providerLogger } from '../../logger';
import {
import type {
AwarenessChanges,
BroadcastChannelMessageEvent,
getClients,
TypedBroadcastChannel,
} from './type';
import { getClients } from './type';
export const createBroadCastChannelProvider = (
blockSuiteWorkspace: BlockSuiteWorkspace

View File

@@ -1,4 +1,4 @@
import { Awareness as YAwareness } from 'y-protocols/awareness';
import type { Awareness as YAwareness } from 'y-protocols/awareness';
export type ClientId = YAwareness['clientID'];
// eslint-disable-next-line @typescript-eslint/ban-types

View File

@@ -2,7 +2,7 @@ import { WebsocketProvider } from '@affine/datacenter';
import { assertExists } from '@blocksuite/store';
import { IndexeddbPersistence } from 'y-indexeddb';
import {
import type {
AffineWebSocketProvider,
BlockSuiteWorkspace,
LocalIndexedDBProvider,