Skip to content

Commit 0b452e0

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

22 files changed

+66
-65
lines changed

scripts/build-atomics.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { RollupOptions } from 'rollup';
22
import {
3-
BuildOptions,
3+
type BuildOptions,
44
fileSize,
55
jsBannerPlugin,
66
syncCommunicationModulesPlugin,

scripts/build-integration.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BuildOptions, submodulePackageJson } from './utils.js';
1+
import { type BuildOptions, submodulePackageJson } from './utils.js';
22
import { join } from 'node:path';
33
import type { OutputOptions, RollupOptions } from 'rollup';
44
import fsExtra from 'fs-extra';

scripts/build-main-snippet.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BuildOptions, fileSize, jsBannerPlugin, versionPlugin } from './utils.js';
1+
import { type BuildOptions, fileSize, jsBannerPlugin, versionPlugin } from './utils.js';
22
import { join } from 'node:path';
33
import { minifyPlugin } from './minify.js';
44
import type { OutputOptions, Plugin, RollupOptions } from 'rollup';

scripts/build-media-implementations.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { OutputOptions, RollupOptions } from 'rollup';
2-
import { BuildOptions, fileSize, jsBannerPlugin, versionPlugin, watchDir } from './utils.js';
2+
import { type BuildOptions, fileSize, jsBannerPlugin, versionPlugin, watchDir } from './utils.js';
33
import { join } from 'node:path';
44
import { minifyPlugin } from './minify.js';
55

scripts/build-react.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BuildOptions, submodulePackageJson, submodulePath } from './utils.js';
1+
import { type BuildOptions, submodulePackageJson, submodulePath } from './utils.js';
22
import { join } from 'node:path';
33
import type { RollupOptions } from 'rollup';
44

scripts/build-service-worker.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { OutputOptions, Plugin, rollup, RollupOptions } from 'rollup';
1+
import { type OutputOptions, type Plugin, rollup, type RollupOptions } from 'rollup';
22
import {
3-
BuildOptions,
3+
type BuildOptions,
44
fileSize,
55
jsBannerPlugin,
6-
MessageType,
6+
type MessageType,
77
onwarn,
88
syncCommunicationModulesPlugin,
99
versionPlugin,

scripts/build-services.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BuildOptions, submodulePackageJson } from './utils.js';
1+
import { type BuildOptions, submodulePackageJson } from './utils.js';
22
import { join } from 'node:path';
33
import type { OutputOptions, RollupOptions } from 'rollup';
44

scripts/build-utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BuildOptions, submodulePackageJson } from './utils.js';
1+
import { type BuildOptions, submodulePackageJson } from './utils.js';
22
import { join } from 'node:path';
33
import type { RollupOptions } from 'rollup';
44

scripts/build-web-worker.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { OutputOptions, Plugin, rollup } from 'rollup';
1+
import { type OutputOptions, type Plugin, rollup } from 'rollup';
22
import {
3-
BuildOptions,
3+
type BuildOptions,
44
getJsBanner,
5-
MessageType,
5+
type MessageType,
66
onwarn,
77
syncCommunicationModulesPlugin,
88
versionPlugin,

scripts/minify.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import terser, { Options } from '@rollup/plugin-terser';
1+
import terser, { type Options } from '@rollup/plugin-terser';
22
import type { Plugin } from 'rollup';
33
import type { BuildOptions } from './utils';
44

src/lib/atomics/sync-create-messenger-atomics.ts

+4-4
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/atomics/sync-send-message-to-main-atomics.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
2-
MainAccessRequest,
3-
MainAccessResponse,
4-
WebWorkerContext,
2+
type MainAccessRequest,
3+
type MainAccessResponse,
4+
type WebWorkerContext,
55
WorkerMessageType,
66
} from '../types';
77

src/lib/log.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import {
2-
ApplyPath,
2+
type ApplyPath,
33
CallType,
4-
InstanceId,
4+
type InstanceId,
55
InterfaceType,
66
NodeName,
7-
WebWorkerEnvironment,
8-
WinId,
7+
type WebWorkerEnvironment,
8+
type WinId,
99
} from './types';
1010
import {
1111
ApplyPathKey,

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import {
44
CallType,
55
NodeName,
66
StateProp,
7-
WebWorkerEnvironment,
8-
WorkerConstructor,
7+
type WebWorkerEnvironment,
8+
type WorkerConstructor,
99
WorkerMessageType,
10-
WorkerNode,
10+
type WorkerNode,
1111
} from '../types';
1212
import {
1313
commaSplit,

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

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
import {
2-
ApplyPath,
2+
type ApplyPath,
33
ApplyPathType,
4-
AssignInstanceId,
5-
CallMethod,
4+
type AssignInstanceId,
5+
type CallMethod,
66
CallType,
7-
ConstructGlobal,
8-
Getter,
9-
HookOptions,
10-
MainAccessRequest,
11-
MainAccessResponse,
12-
MainAccessTask,
13-
Setter,
7+
type ConstructGlobal,
8+
type Getter,
9+
type HookOptions,
10+
type MainAccessRequest,
11+
type MainAccessResponse,
12+
type MainAccessTask,
13+
type Setter,
1414
WorkerMessageType,
15-
WorkerInstance,
16-
WorkerNode,
15+
type WorkerInstance,
16+
type WorkerNode,
1717
} from '../types';
1818
import {
1919
ApplyPathKey,

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { getInstanceStateValue, setInstanceStateValue } from './worker-state';
33
import { getter, setter } from './worker-proxy';
44
import { HTMLSrcElementDescriptorMap } from './worker-src-element';
55
import { resolveUrl } from './worker-exec';
6-
import { StateProp, WebWorkerEnvironment, WorkerNode } from '../types';
6+
import { StateProp, type WebWorkerEnvironment, type WorkerNode } from '../types';
77
import { webWorkerCtx } from './worker-constants';
88

99
export const patchHTMLScriptElement = (WorkerHTMLScriptElement: any, env: WebWorkerEnvironment) => {

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

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import {
2-
ApplyPath,
2+
type ApplyPath,
33
CallType,
4-
InstanceId,
5-
RefHandlerCallbackData,
6-
RefId,
7-
SerializedAttr,
8-
SerializedInstance,
9-
SerializedObject,
10-
SerializedRefTransferData,
11-
SerializedTransfer,
4+
type InstanceId,
5+
type RefHandlerCallbackData,
6+
type RefId,
7+
type SerializedAttr,
8+
type SerializedInstance,
9+
type SerializedObject,
10+
type SerializedRefTransferData,
11+
type SerializedTransfer,
1212
SerializedType,
13-
WebWorkerEnvironment,
14-
WinId,
15-
WorkerNode,
13+
type WebWorkerEnvironment,
14+
type WinId,
15+
type WorkerNode,
1616
} from '../types';
1717
import { callMethod } from './worker-proxy';
1818
import {

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { callMethod } from './worker-proxy';
22
import { commaSplit } from './worker-constants';
3-
import { EventHandler, StateProp, WorkerNode } from '../types';
3+
import { type EventHandler, StateProp, type WorkerNode } from '../types';
44
import { getInstanceStateValue, setInstanceStateValue } from './worker-state';
55
import { noop } from '../utils';
66

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { callMethod, getter } from './worker-proxy';
2-
import { CallType, WebWorkerEnvironment } from '../types';
2+
import { CallType, type WebWorkerEnvironment } from '../types';
33
import { EMPTY_ARRAY } from '../utils';
44
import { warnCrossOrigin } from '../log';
55

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { cachedDimensions } from './worker-constants';
22
import { callMethod, getter } from './worker-proxy';
3-
import { CallType, StateProp, WorkerNode } from '../types';
3+
import { CallType, StateProp, type WorkerNode } from '../types';
44
import { defineConstructorName, definePrototypePropertyDescriptor } from '../utils';
55
import { getInstanceStateValue, setInstanceStateValue } from './worker-state';
66
import { logDimensionCacheClearMethod } from '../log';

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

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
import { addStorageApi } from './worker-storage';
22
import {
3-
ApplyPath,
3+
type ApplyPath,
44
CallType,
5-
InstanceId,
5+
type InstanceId,
66
InterfaceType,
77
NodeName,
8-
WebWorkerEnvironment,
8+
type WebWorkerEnvironment,
99
WinDocId,
10-
WinId,
11-
WorkerInstance,
12-
WorkerNode,
13-
WorkerNodeConstructors,
14-
WorkerWindow,
10+
type WinId,
11+
type WorkerInstance,
12+
type WorkerNode,
13+
type WorkerNodeConstructors,
14+
type WorkerWindow,
1515
} from '../types';
1616
import {
1717
ABOUT_BLANK,

src/react/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
export { Partytown, PartytownProps } from './snippet';
1+
export { Partytown } from './snippet';
2+
export type { PartytownProps } from './snippet';

0 commit comments

Comments
 (0)