Skip to content

Commit a9e5de0

Browse files
committed
fix: fix up imports type
1 parent 0b452e0 commit a9e5de0

22 files changed

+62
-63
lines changed

src/lib/sandbox/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import { libPath, mainWindow } from './main-globals';
44
import { logMain } from '../log';
55
import { mainAccessHandler } from './main-access-handler';
66
import {
7-
MessageFromWorkerToSandbox,
8-
MessengerRequestCallback,
9-
PartytownWebWorker,
7+
type MessageFromWorkerToSandbox,
8+
type MessengerRequestCallback,
9+
type PartytownWebWorker,
1010
WorkerMessageType,
1111
} from '../types';
1212
import { registerWindow } from './main-register-window';

src/lib/sandbox/main-access-handler.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import {
2-
ApplyPath,
2+
type ApplyPath,
33
ApplyPathType,
4-
MainAccessRequest,
5-
MainAccessResponse,
6-
MainAccessTask,
7-
PartytownWebWorker,
8-
WinId,
4+
type MainAccessRequest,
5+
type MainAccessResponse,
6+
type MainAccessTask,
7+
type PartytownWebWorker,
8+
type WinId,
99
} from '../types';
1010
import { debug, getConstructorName, isPromise, len } from '../utils';
1111
import { defineCustomElement } from './main-custom-element';

src/lib/sandbox/main-custom-element.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CustomElementData, PartytownWebWorker, WinId, WorkerMessageType } from '../types';
1+
import { type CustomElementData, type PartytownWebWorker, type WinId, WorkerMessageType } from '../types';
22
import { defineConstructorName } from '../utils';
33
import { getAndSetInstanceId } from './main-instances';
44
import { winCtxs } from './main-constants';

src/lib/sandbox/main-forward-trigger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
len,
55
resolvePartytownForwardProperty,
66
} from '../utils';
7-
import { MainWindow, PartytownWebWorker, WinId, WorkerMessageType } from '../types';
7+
import { type MainWindow, type PartytownWebWorker, type WinId, WorkerMessageType } from '../types';
88
import { serializeForWorker } from './main-serialization';
99

1010
export const mainForwardTrigger = (worker: PartytownWebWorker, $winId$: WinId, win: MainWindow) => {

src/lib/sandbox/main-instances.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { CreatedKey, InstanceIdKey, instances, winCtxs, windowIds } from './main-constants';
2-
import { InstanceId, MainWindowContext, WinDocId, WinId } from '../types';
2+
import { type InstanceId, type MainWindowContext, WinDocId, type WinId } from '../types';
33
import { randomId } from '../utils';
44

55
export const getAndSetInstanceId = (instance: any, instanceId?: InstanceId) => {

src/lib/sandbox/main-register-window.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { debug } from '../utils';
22
import { logMain, normalizedWinId } from '../log';
33
import {
4-
MainWindow,
5-
PartytownWebWorker,
6-
WinId,
4+
type MainWindow,
5+
type PartytownWebWorker,
6+
type WinId,
77
WorkerMessageType,
88
LocationUpdateType,
99
} from '../types';

src/lib/sandbox/main-serialization.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ import { getConstructorName, getNodeName, isValidMemberName, startsWith } from '
22
import { getInstance, getAndSetInstanceId } from './main-instances';
33
import { mainRefs } from './main-constants';
44
import {
5-
PartytownWebWorker,
6-
SerializedCSSRule,
7-
SerializedInstance,
8-
SerializedObject,
9-
SerializedRefTransferData,
10-
SerializedTransfer,
5+
type PartytownWebWorker,
6+
type SerializedCSSRule,
7+
type SerializedInstance,
8+
type SerializedObject,
9+
type SerializedRefTransferData,
10+
type SerializedTransfer,
1111
SerializedType,
12-
WinId,
12+
type WinId,
1313
WorkerMessageType,
1414
} from '../types';
1515

src/lib/sandbox/on-messenge-from-worker.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { initializedWorkerScript, readNextScript } from './read-main-scripts';
22
import { mainWindow } from './main-globals';
33
import {
4-
MainWindowContext,
5-
MessageFromWorkerToSandbox,
6-
PartytownWebWorker,
7-
WinId,
4+
type MainWindowContext,
5+
type MessageFromWorkerToSandbox,
6+
type PartytownWebWorker,
7+
type WinId,
88
WorkerMessageType,
99
} from '../types';
1010
import { randomId } from '../utils';

src/lib/sandbox/read-main-platform.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
serializeConfig,
88
} from '../utils';
99
import { config, docImpl, libPath, mainWindow } from './main-globals';
10-
import { InterfaceType, InterfaceInfo, InterfaceMember, InitWebWorkerData } from '../types';
10+
import { InterfaceType, type InterfaceInfo, type InterfaceMember, type InitWebWorkerData } from '../types';
1111

1212
export const readMainPlatform = () => {
1313
const elm = docImpl.createElement('i');

src/lib/sandbox/read-main-scripts.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { debug, SCRIPT_TYPE, SCRIPT_TYPE_EXEC } from '../utils';
22
import { getAndSetInstanceId } from './main-instances';
33
import {
4-
InitializeScriptData,
5-
InstanceId,
6-
MainWindowContext,
7-
PartytownWebWorker,
4+
type InitializeScriptData,
5+
type InstanceId,
6+
type MainWindowContext,
7+
type PartytownWebWorker,
88
WorkerMessageType,
99
} from '../types';
1010
import { mainForwardTrigger } from './main-forward-trigger';

src/lib/service-worker/sync-create-messenger-sw.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import {
2-
MainAccessRequest,
3-
MessageFromWorkerToSandbox,
4-
Messenger,
5-
PartytownWebWorker,
2+
type MainAccessRequest,
3+
type MessageFromWorkerToSandbox,
4+
type Messenger,
5+
type PartytownWebWorker,
66
WorkerMessageType,
77
} from '../types';
88
import { onMessageFromWebWorker } from '../sandbox/on-messenge-from-worker';

src/lib/web-worker/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { callWorkerRefHandler } from './worker-serialization';
33
import { createEnvironment } from './worker-environment';
44
import { debug } from '../utils';
55
import { environments, webWorkerCtx } from './worker-constants';
6-
import { ForwardMainTriggerData, MessageFromSandboxToWorker, WorkerMessageType } from '../types';
6+
import { type ForwardMainTriggerData, type MessageFromSandboxToWorker, WorkerMessageType } from '../types';
77
import { initNextScriptsInWebWorker } from './worker-exec';
88
import { initWebWorker } from './init-web-worker';
99
import { logWorker, normalizedWinId } from '../log';

src/lib/web-worker/media/canvas.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
randomId,
99
} from './bridge';
1010
import { ContextKey, defineCstr, notImpl } from './utils';
11-
import { CallType, WorkerConstructor, WorkerInstance, WorkerWindow } from '../../types';
11+
import { CallType, type WorkerConstructor, type WorkerInstance, type WorkerWindow } from '../../types';
1212

1313
export const initCanvas = (WorkerBase: WorkerConstructor, win: WorkerWindow) => {
1414
const HTMLCanvasDescriptorMap: PropertyDescriptorMap & ThisType<Node> = {

src/lib/web-worker/media/media.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import {
22
CallType,
3-
MediaSelf,
4-
WebWorkerEnvironment,
5-
WorkerConstructor,
6-
WorkerWindow,
3+
type MediaSelf,
4+
type WebWorkerEnvironment,
5+
type WorkerConstructor,
6+
type WorkerWindow,
77
} from '../../types';
88
import {
99
defineCstr,

src/lib/web-worker/worker-anchor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { definePrototypePropertyDescriptor, isValidUrl } from '../utils';
33
import { getInstanceStateValue, setInstanceStateValue } from './worker-state';
44
import { getter, setter } from './worker-proxy';
55
import { resolveToUrl } from './worker-exec';
6-
import { StateProp, WebWorkerEnvironment, WorkerNode } from '../types';
6+
import { StateProp, type WebWorkerEnvironment, type WorkerNode } from '../types';
77

88
export const patchHTMLAnchorElement = (WorkerHTMLAnchorElement: any, env: WebWorkerEnvironment) => {
99
const HTMLAnchorDescriptorMap: PropertyDescriptorMap & ThisType<WorkerNode> = {};

src/lib/web-worker/worker-css-style-declaration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ApplyPath, CallType, InstanceId, WinId, WorkerConstructor } from '../types';
1+
import { type ApplyPath, CallType, type InstanceId, type WinId, type WorkerConstructor } from '../types';
22
import { cachedDimensions, InstanceDataKey } from './worker-constants';
33
import { callMethod, getter, setter } from './worker-proxy';
44
import { defineConstructorName } from '../utils';

src/lib/web-worker/worker-document.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ import {
33
CallType,
44
NodeName,
55
StateProp,
6-
WebWorkerEnvironment,
7-
WinDocId,
8-
WorkerNode,
6+
type WebWorkerEnvironment,
7+
type WorkerNode,
98
} from '../types';
109
import {
1110
cachedProps,

src/lib/web-worker/worker-environment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { createWindow } from './worker-window';
22
import { debug } from '../utils';
33
import { environments, webWorkerCtx } from './worker-constants';
4-
import { InitializeEnvironmentData, WorkerMessageType } from '../types';
4+
import { type InitializeEnvironmentData, WorkerMessageType } from '../types';
55
import { logWorker, normalizedWinId } from '../log';
66

77
export const createEnvironment = (

src/lib/web-worker/worker-exec.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import { VERSION } from '../build-modules/version';
22
import { logWorker } from '../log';
33
import {
4-
EventHandler,
5-
InitializeScriptData,
6-
InstanceId,
4+
type EventHandler,
5+
type InitializeScriptData,
6+
type InstanceId,
77
NodeName,
8-
ResolveUrlType,
8+
type ResolveUrlType,
99
StateProp,
10-
WebWorkerEnvironment,
11-
WinId,
12-
WorkerInstance,
10+
type WebWorkerEnvironment,
11+
type WinId,
12+
type WorkerInstance,
1313
WorkerMessageType,
1414
} from '../types';
1515
import { debug } from '../utils';

src/lib/web-worker/worker-iframe.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import { HTMLSrcElementDescriptorMap } from './worker-src-element';
1313
import { setInstanceStateValue, getInstanceStateValue } from './worker-state';
1414
import {
1515
StateProp,
16-
WebWorkerEnvironment,
17-
WorkerInstance,
16+
type WebWorkerEnvironment,
17+
type WorkerInstance,
1818
WorkerMessageType,
19-
WorkerNode,
19+
type WorkerNode,
2020
} from '../types';
2121

2222
export const patchHTMLIFrameElement = (WorkerHTMLIFrameElement: any, env: WebWorkerEnvironment) => {

src/lib/web-worker/worker-location.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { LocationUpdateData, LocationUpdateType, WebWorkerEnvironment } from '../types';
1+
import { type LocationUpdateData, LocationUpdateType, type WebWorkerEnvironment } from '../types';
22

33
export function forwardLocationChange(
44
$winId$: number,

src/lib/web-worker/worker-named-node-map.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import {
2-
ApplyPath,
2+
type ApplyPath,
33
CallType,
4-
InstanceId,
5-
WinId,
6-
WorkerConstructor,
7-
WorkerInstance,
4+
type InstanceId,
5+
type WinId,
6+
type WorkerConstructor,
7+
type WorkerInstance,
88
} from '../types';
99
import { defineConstructorName } from '../utils';
1010
import { callMethod, getter, setter } from './worker-proxy';

0 commit comments

Comments
 (0)