feat: enable verbatimModuleSyntax in TypeScript config (#5533)

## Summary
- Enable `verbatimModuleSyntax` compiler option in TypeScript
configuration
- Update all type imports to use explicit `import type` syntax
- This change will Improve tree-shaking and bundler compatibility

## Motivation
The `verbatimModuleSyntax` option ensures that type-only imports are
explicitly marked with the `type` keyword. This:
- Makes import/export intentions clearer
- Improves tree-shaking by helping bundlers identify what can be safely
removed
- Ensures better compatibility with modern bundlers
- Follows TypeScript best practices for module syntax

## Changes
- Added `"verbatimModuleSyntax": true` to `tsconfig.json`
- Updated another 48+ files to use explicit `import type` syntax for
type-only imports
- No functional changes, only import/export syntax improvements

## Test Plan
- [x] TypeScript compilation passes
- [x] Build completes successfully  
- [x] Tests pass
- [ ] No runtime behavior changes

🤖 Generated with [Claude Code](https://claude.ai/code)

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-5533-feat-enable-verbatimModuleSyntax-in-TypeScript-config-26d6d73d36508190b424ef9b379b5130)
by [Unito](https://www.unito.io)
This commit is contained in:
snomiao
2025-09-19 13:05:56 +09:00
committed by GitHub
parent 726a2fbbc9
commit cbb0f765b8
37 changed files with 96 additions and 80 deletions

View File

@@ -1,5 +1,5 @@
import path from 'path' import path from 'path'
import { Plugin } from 'vite' import type { Plugin } from 'vite'
interface ShimResult { interface ShimResult {
code: string code: string

View File

@@ -1,7 +1,7 @@
import glob from 'fast-glob' import glob from 'fast-glob'
import fs from 'fs-extra' import fs from 'fs-extra'
import { dirname, join } from 'node:path' import { dirname, join } from 'node:path'
import { HtmlTagDescriptor, Plugin, normalizePath } from 'vite' import { type HtmlTagDescriptor, type Plugin, normalizePath } from 'vite'
interface ImportMapSource { interface ImportMapSource {
name: string name: string

View File

@@ -11,16 +11,16 @@ import {
} from '@/lib/litegraph/src/litegraph' } from '@/lib/litegraph/src/litegraph'
import { useToastStore } from '@/platform/updates/common/toastStore' import { useToastStore } from '@/platform/updates/common/toastStore'
import { import {
ComfyLink, type ComfyLink,
ComfyNode, type ComfyNode,
ComfyWorkflowJSON type ComfyWorkflowJSON
} from '@/platform/workflow/validation/schemas/workflowSchema' } from '@/platform/workflow/validation/schemas/workflowSchema'
import type { ComfyNodeDef } from '@/schemas/nodeDefSchema' import type { ComfyNodeDef } from '@/schemas/nodeDefSchema'
import { useDialogService } from '@/services/dialogService' import { useDialogService } from '@/services/dialogService'
import { useExecutionStore } from '@/stores/executionStore' import { useExecutionStore } from '@/stores/executionStore'
import { useNodeDefStore } from '@/stores/nodeDefStore' import { useNodeDefStore } from '@/stores/nodeDefStore'
import { useWidgetStore } from '@/stores/widgetStore' import { useWidgetStore } from '@/stores/widgetStore'
import { ComfyExtension } from '@/types/comfy' import { type ComfyExtension } from '@/types/comfy'
import { ExecutableGroupNodeChildDTO } from '@/utils/executableGroupNodeChildDTO' import { ExecutableGroupNodeChildDTO } from '@/utils/executableGroupNodeChildDTO'
import { GROUP } from '@/utils/executableGroupNodeDto' import { GROUP } from '@/utils/executableGroupNodeDto'
import { deserialiseAndCreate, serialise } from '@/utils/vintageClipboard' import { deserialiseAndCreate, serialise } from '@/utils/vintageClipboard'

View File

@@ -9,7 +9,7 @@ import Load3dUtils from '@/extensions/core/load3d/Load3dUtils'
import { t } from '@/i18n' import { t } from '@/i18n'
import type { IStringWidget } from '@/lib/litegraph/src/types/widgets' import type { IStringWidget } from '@/lib/litegraph/src/types/widgets'
import { useToastStore } from '@/platform/updates/common/toastStore' import { useToastStore } from '@/platform/updates/common/toastStore'
import { CustomInputSpec } from '@/schemas/nodeDef/nodeDefSchemaV2' import { type CustomInputSpec } from '@/schemas/nodeDef/nodeDefSchemaV2'
import { api } from '@/scripts/api' import { api } from '@/scripts/api'
import { ComfyApp, app } from '@/scripts/app' import { ComfyApp, app } from '@/scripts/app'
import { ComponentWidgetImpl, addWidget } from '@/scripts/domWidget' import { ComponentWidgetImpl, addWidget } from '@/scripts/domWidget'

View File

@@ -1,9 +1,9 @@
import * as THREE from 'three' import * as THREE from 'three'
import { import {
AnimationItem, type AnimationItem,
AnimationManagerInterface, type AnimationManagerInterface,
EventManagerInterface type EventManagerInterface
} from '@/extensions/core/load3d/interfaces' } from '@/extensions/core/load3d/interfaces'
export class AnimationManager implements AnimationManagerInterface { export class AnimationManager implements AnimationManagerInterface {

View File

@@ -2,11 +2,11 @@ import * as THREE from 'three'
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls' import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls'
import { import {
CameraManagerInterface, type CameraManagerInterface,
CameraState, type CameraState,
CameraType, type CameraType,
EventManagerInterface, type EventManagerInterface,
NodeStorageInterface type NodeStorageInterface
} from './interfaces' } from './interfaces'
export class CameraManager implements CameraManagerInterface { export class CameraManager implements CameraManagerInterface {

View File

@@ -2,9 +2,9 @@ import * as THREE from 'three'
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls' import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls'
import { import {
ControlsManagerInterface, type ControlsManagerInterface,
EventManagerInterface, type EventManagerInterface,
NodeStorageInterface type NodeStorageInterface
} from './interfaces' } from './interfaces'
export class ControlsManager implements ControlsManagerInterface { export class ControlsManager implements ControlsManagerInterface {

View File

@@ -1,4 +1,4 @@
import { EventCallback, EventManagerInterface } from './interfaces' import { type EventCallback, type EventManagerInterface } from './interfaces'
export class EventManager implements EventManagerInterface { export class EventManager implements EventManagerInterface {
private listeners: { [key: string]: EventCallback[] } = {} private listeners: { [key: string]: EventCallback[] } = {}

View File

@@ -1,6 +1,9 @@
import * as THREE from 'three' import * as THREE from 'three'
import { EventManagerInterface, LightingManagerInterface } from './interfaces' import {
type EventManagerInterface,
type LightingManagerInterface
} from './interfaces'
export class LightingManager implements LightingManagerInterface { export class LightingManager implements LightingManagerInterface {
lights: THREE.Light[] = [] lights: THREE.Light[] = []

View File

@@ -1,7 +1,7 @@
import * as THREE from 'three' import * as THREE from 'three'
import { LGraphNode } from '@/lib/litegraph/src/litegraph' import { LGraphNode } from '@/lib/litegraph/src/litegraph'
import { CustomInputSpec } from '@/schemas/nodeDef/nodeDefSchemaV2' import { type CustomInputSpec } from '@/schemas/nodeDef/nodeDefSchemaV2'
import { CameraManager } from './CameraManager' import { CameraManager } from './CameraManager'
import { ControlsManager } from './ControlsManager' import { ControlsManager } from './ControlsManager'
@@ -16,11 +16,11 @@ import { SceneManager } from './SceneManager'
import { SceneModelManager } from './SceneModelManager' import { SceneModelManager } from './SceneModelManager'
import { ViewHelperManager } from './ViewHelperManager' import { ViewHelperManager } from './ViewHelperManager'
import { import {
CameraState, type CameraState,
CaptureResult, type CaptureResult,
Load3DOptions, type Load3DOptions,
MaterialMode, type MaterialMode,
UpDirection type UpDirection
} from './interfaces' } from './interfaces'
class Load3d { class Load3d {

View File

@@ -4,7 +4,7 @@ import { LGraphNode } from '@/lib/litegraph/src/litegraph'
import { AnimationManager } from './AnimationManager' import { AnimationManager } from './AnimationManager'
import Load3d from './Load3d' import Load3d from './Load3d'
import { Load3DOptions } from './interfaces' import { type Load3DOptions } from './interfaces'
class Load3dAnimation extends Load3d { class Load3dAnimation extends Load3d {
private animationManager: AnimationManager private animationManager: AnimationManager

View File

@@ -9,9 +9,9 @@ import { t } from '@/i18n'
import { useToastStore } from '@/platform/updates/common/toastStore' import { useToastStore } from '@/platform/updates/common/toastStore'
import { import {
EventManagerInterface, type EventManagerInterface,
LoaderManagerInterface, type LoaderManagerInterface,
ModelManagerInterface type ModelManagerInterface
} from './interfaces' } from './interfaces'
export class LoaderManager implements LoaderManagerInterface { export class LoaderManager implements LoaderManagerInterface {

View File

@@ -1,6 +1,6 @@
import { LGraphNode } from '@/lib/litegraph/src/litegraph' import { LGraphNode } from '@/lib/litegraph/src/litegraph'
import { NodeStorageInterface } from './interfaces' import { type NodeStorageInterface } from './interfaces'
export class NodeStorage implements NodeStorageInterface { export class NodeStorage implements NodeStorageInterface {
private node: LGraphNode private node: LGraphNode

View File

@@ -1,7 +1,10 @@
import * as THREE from 'three' import * as THREE from 'three'
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls' import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls'
import { EventManagerInterface, PreviewManagerInterface } from './interfaces' import {
type EventManagerInterface,
type PreviewManagerInterface
} from './interfaces'
export class PreviewManager implements PreviewManagerInterface { export class PreviewManager implements PreviewManagerInterface {
previewCamera: THREE.Camera previewCamera: THREE.Camera

View File

@@ -1,6 +1,6 @@
import * as THREE from 'three' import * as THREE from 'three'
import { EventManagerInterface } from './interfaces' import { type EventManagerInterface } from './interfaces'
export class RecordingManager { export class RecordingManager {
private mediaRecorder: MediaRecorder | null = null private mediaRecorder: MediaRecorder | null = null

View File

@@ -2,7 +2,10 @@ import * as THREE from 'three'
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls' import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls'
import Load3dUtils from './Load3dUtils' import Load3dUtils from './Load3dUtils'
import { EventManagerInterface, SceneManagerInterface } from './interfaces' import {
type EventManagerInterface,
type SceneManagerInterface
} from './interfaces'
export class SceneManager implements SceneManagerInterface { export class SceneManager implements SceneManagerInterface {
scene: THREE.Scene scene: THREE.Scene

View File

@@ -2,7 +2,7 @@ import * as THREE from 'three'
import { LineMaterial } from 'three/examples/jsm/lines/LineMaterial' import { LineMaterial } from 'three/examples/jsm/lines/LineMaterial'
import { LineSegments2 } from 'three/examples/jsm/lines/LineSegments2' import { LineSegments2 } from 'three/examples/jsm/lines/LineSegments2'
import { LineSegmentsGeometry } from 'three/examples/jsm/lines/LineSegmentsGeometry' import { LineSegmentsGeometry } from 'three/examples/jsm/lines/LineSegmentsGeometry'
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader' import { type GLTF } from 'three/examples/jsm/loaders/GLTFLoader'
import { mergeVertices } from 'three/examples/jsm/utils/BufferGeometryUtils' import { mergeVertices } from 'three/examples/jsm/utils/BufferGeometryUtils'
import { ColoredShadowMaterial } from './conditional-lines/ColoredShadowMaterial' import { ColoredShadowMaterial } from './conditional-lines/ColoredShadowMaterial'
@@ -11,11 +11,11 @@ import { ConditionalEdgesShader } from './conditional-lines/ConditionalEdgesShad
import { ConditionalLineMaterial } from './conditional-lines/Lines2/ConditionalLineMaterial' import { ConditionalLineMaterial } from './conditional-lines/Lines2/ConditionalLineMaterial'
import { ConditionalLineSegmentsGeometry } from './conditional-lines/Lines2/ConditionalLineSegmentsGeometry' import { ConditionalLineSegmentsGeometry } from './conditional-lines/Lines2/ConditionalLineSegmentsGeometry'
import { import {
EventManagerInterface, type EventManagerInterface,
Load3DOptions, type Load3DOptions,
MaterialMode, type MaterialMode,
ModelManagerInterface, type ModelManagerInterface,
UpDirection type UpDirection
} from './interfaces' } from './interfaces'
export class SceneModelManager implements ModelManagerInterface { export class SceneModelManager implements ModelManagerInterface {

View File

@@ -2,7 +2,10 @@ import * as THREE from 'three'
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls' import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls'
import { ViewHelper } from 'three/examples/jsm/helpers/ViewHelper' import { ViewHelper } from 'three/examples/jsm/helpers/ViewHelper'
import { NodeStorageInterface, ViewHelperManagerInterface } from './interfaces' import {
type NodeStorageInterface,
type ViewHelperManagerInterface
} from './interfaces'
export class ViewHelperManager implements ViewHelperManagerInterface { export class ViewHelperManager implements ViewHelperManagerInterface {
viewHelper: ViewHelper = {} as ViewHelper viewHelper: ViewHelper = {} as ViewHelper

View File

@@ -2,13 +2,13 @@ import * as THREE from 'three'
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls' import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls'
import { ViewHelper } from 'three/examples/jsm/helpers/ViewHelper' import { ViewHelper } from 'three/examples/jsm/helpers/ViewHelper'
import { FBXLoader } from 'three/examples/jsm/loaders/FBXLoader' import { FBXLoader } from 'three/examples/jsm/loaders/FBXLoader'
import { GLTF, GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader' import { type GLTF, GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader'
import { MTLLoader } from 'three/examples/jsm/loaders/MTLLoader' import { MTLLoader } from 'three/examples/jsm/loaders/MTLLoader'
import { OBJLoader } from 'three/examples/jsm/loaders/OBJLoader' import { OBJLoader } from 'three/examples/jsm/loaders/OBJLoader'
import { STLLoader } from 'three/examples/jsm/loaders/STLLoader' import { STLLoader } from 'three/examples/jsm/loaders/STLLoader'
import { LGraphNode } from '@/lib/litegraph/src/litegraph' import { LGraphNode } from '@/lib/litegraph/src/litegraph'
import { CustomInputSpec } from '@/schemas/nodeDef/nodeDefSchemaV2' import { type CustomInputSpec } from '@/schemas/nodeDef/nodeDefSchemaV2'
export type Load3DNodeType = 'Load3D' | 'Preview3D' export type Load3DNodeType = 'Load3D' | 'Preview3D'

View File

@@ -4,7 +4,7 @@ https://github.com/rgthree/rgthree-comfy/blob/main/py/display_any.py
upstream requested in https://github.com/Kosinkadink/rfcs/blob/main/rfcs/0000-corenodes.md#preview-nodes upstream requested in https://github.com/Kosinkadink/rfcs/blob/main/rfcs/0000-corenodes.md#preview-nodes
*/ */
import { app } from '@/scripts/app' import { app } from '@/scripts/app'
import { DOMWidget } from '@/scripts/domWidget' import { type DOMWidget } from '@/scripts/domWidget'
import { ComfyWidgets } from '@/scripts/widgets' import { ComfyWidgets } from '@/scripts/widgets'
import { useExtensionService } from '@/services/extensionService' import { useExtensionService } from '@/services/extensionService'

View File

@@ -2,7 +2,7 @@ import { nextTick } from 'vue'
import Load3D from '@/components/load3d/Load3D.vue' import Load3D from '@/components/load3d/Load3D.vue'
import Load3DConfiguration from '@/extensions/core/load3d/Load3DConfiguration' import Load3DConfiguration from '@/extensions/core/load3d/Load3DConfiguration'
import { CustomInputSpec } from '@/schemas/nodeDef/nodeDefSchemaV2' import { type CustomInputSpec } from '@/schemas/nodeDef/nodeDefSchemaV2'
import { ComponentWidgetImpl, addWidget } from '@/scripts/domWidget' import { ComponentWidgetImpl, addWidget } from '@/scripts/domWidget'
import { useExtensionService } from '@/services/extensionService' import { useExtensionService } from '@/services/extensionService'
import { useLoad3dService } from '@/services/load3dService' import { useLoad3dService } from '@/services/load3dService'

View File

@@ -15,7 +15,7 @@ import type { ResultItemType } from '@/schemas/apiSchema'
import type { ComfyNodeDef } from '@/schemas/nodeDefSchema' import type { ComfyNodeDef } from '@/schemas/nodeDefSchema'
import type { DOMWidget } from '@/scripts/domWidget' import type { DOMWidget } from '@/scripts/domWidget'
import { useAudioService } from '@/services/audioService' import { useAudioService } from '@/services/audioService'
import { NodeLocatorId } from '@/types' import { type NodeLocatorId } from '@/types'
import { getNodeByLocatorId } from '@/utils/graphTraversalUtil' import { getNodeByLocatorId } from '@/utils/graphTraversalUtil'
import { api } from '../../scripts/api' import { api } from '../../scripts/api'

View File

@@ -1,6 +1,6 @@
import { import {
ComfyNodeDef, type ComfyNodeDef,
InputSpec, type InputSpec,
isComboInputSpecV1 isComboInputSpecV1
} from '@/schemas/nodeDefSchema' } from '@/schemas/nodeDefSchema'

View File

@@ -7,7 +7,7 @@ import type {
ModelFolderInfo ModelFolderInfo
} from '@/platform/assets/schemas/assetSchema' } from '@/platform/assets/schemas/assetSchema'
import { useToastStore } from '@/platform/updates/common/toastStore' import { useToastStore } from '@/platform/updates/common/toastStore'
import { WorkflowTemplates } from '@/platform/workflow/templates/types/template' import { type WorkflowTemplates } from '@/platform/workflow/templates/types/template'
import type { import type {
ComfyApiWorkflow, ComfyApiWorkflow,
ComfyWorkflowJSON, ComfyWorkflowJSON,

View File

@@ -19,7 +19,7 @@ import { useWorkflowService } from '@/platform/workflow/core/services/workflowSe
import { ComfyWorkflow } from '@/platform/workflow/management/stores/workflowStore' import { ComfyWorkflow } from '@/platform/workflow/management/stores/workflowStore'
import { useWorkflowValidation } from '@/platform/workflow/validation/composables/useWorkflowValidation' import { useWorkflowValidation } from '@/platform/workflow/validation/composables/useWorkflowValidation'
import { import {
ComfyApiWorkflow, type ComfyApiWorkflow,
type ComfyWorkflowJSON, type ComfyWorkflowJSON,
type ModelFile, type ModelFile,
type NodeId, type NodeId,
@@ -61,9 +61,9 @@ import { useWidgetStore } from '@/stores/widgetStore'
import { useColorPaletteStore } from '@/stores/workspace/colorPaletteStore' import { useColorPaletteStore } from '@/stores/workspace/colorPaletteStore'
import { useWorkspaceStore } from '@/stores/workspaceStore' import { useWorkspaceStore } from '@/stores/workspaceStore'
import type { ComfyExtension, MissingNodeType } from '@/types/comfy' import type { ComfyExtension, MissingNodeType } from '@/types/comfy'
import { ExtensionManager } from '@/types/extensionTypes' import { type ExtensionManager } from '@/types/extensionTypes'
import type { NodeExecutionId } from '@/types/nodeIdentification' import type { NodeExecutionId } from '@/types/nodeIdentification'
import { ColorAdjustOptions, adjustColor } from '@/utils/colorUtil' import { type ColorAdjustOptions, adjustColor } from '@/utils/colorUtil'
import { graphToPrompt } from '@/utils/executionUtil' import { graphToPrompt } from '@/utils/executionUtil'
import { forEachNode } from '@/utils/graphTraversalUtil' import { forEachNode } from '@/utils/graphTraversalUtil'
import { import {

View File

@@ -2,7 +2,7 @@ import {
type AvifIinfBox, type AvifIinfBox,
type AvifIlocBox, type AvifIlocBox,
type AvifInfeBox, type AvifInfeBox,
ComfyMetadata, type ComfyMetadata,
ComfyMetadataTags, ComfyMetadataTags,
type IsobmffBoxContentRange type IsobmffBoxContentRange
} from '@/types/metadataTypes' } from '@/types/metadataTypes'

View File

@@ -3,12 +3,12 @@ import {
type ComfyWorkflowJSON type ComfyWorkflowJSON
} from '@/platform/workflow/validation/schemas/workflowSchema' } from '@/platform/workflow/validation/schemas/workflowSchema'
import { import {
ComfyMetadata, type ComfyMetadata,
ComfyMetadataTags, ComfyMetadataTags,
EbmlElementRange, type EbmlElementRange,
EbmlTagPosition, type EbmlTagPosition,
TextRange, type TextRange,
VInt type VInt
} from '@/types/metadataTypes' } from '@/types/metadataTypes'
const WEBM_SIGNATURE = [0x1a, 0x45, 0xdf, 0xa3] const WEBM_SIGNATURE = [0x1a, 0x45, 0xdf, 0xa3]

View File

@@ -1,14 +1,14 @@
import { import {
ComfyApiWorkflow, type ComfyApiWorkflow,
ComfyWorkflowJSON type ComfyWorkflowJSON
} from '@/platform/workflow/validation/schemas/workflowSchema' } from '@/platform/workflow/validation/schemas/workflowSchema'
import { import {
ASCII, ASCII,
ComfyMetadata, type ComfyMetadata,
ComfyMetadataTags, ComfyMetadataTags,
GltfChunkHeader, type GltfChunkHeader,
GltfHeader, type GltfHeader,
GltfJsonData, type GltfJsonData,
GltfSizeBytes GltfSizeBytes
} from '@/types/metadataTypes' } from '@/types/metadataTypes'

View File

@@ -1,12 +1,12 @@
import { import {
ComfyApiWorkflow, type ComfyApiWorkflow,
ComfyWorkflowJSON type ComfyWorkflowJSON
} from '@/platform/workflow/validation/schemas/workflowSchema' } from '@/platform/workflow/validation/schemas/workflowSchema'
import { import {
ASCII, ASCII,
ComfyMetadata, type ComfyMetadata,
ComfyMetadataTags, ComfyMetadataTags,
IsobmffBoxContentRange type IsobmffBoxContentRange
} from '@/types/metadataTypes' } from '@/types/metadataTypes'
// Set max read high, as atoms are stored near end of file // Set max read high, as atoms are stored near end of file

View File

@@ -1,4 +1,4 @@
import { ComfyMetadata } from '@/types/metadataTypes' import { type ComfyMetadata } from '@/types/metadataTypes'
export async function getSvgMetadata(file: File): Promise<ComfyMetadata> { export async function getSvgMetadata(file: File): Promise<ComfyMetadata> {
const text = await file.text() const text = await file.text()

View File

@@ -1,6 +1,6 @@
import { useSettingStore } from '@/platform/settings/settingStore' import { useSettingStore } from '@/platform/settings/settingStore'
import { WORKFLOW_ACCEPT_STRING } from '@/platform/workflow/core/types/formats' import { WORKFLOW_ACCEPT_STRING } from '@/platform/workflow/core/types/formats'
import { type StatusWsMessageStatus, TaskItem } from '@/schemas/apiSchema' import { type StatusWsMessageStatus, type TaskItem } from '@/schemas/apiSchema'
import { useDialogService } from '@/services/dialogService' import { useDialogService } from '@/services/dialogService'
import { useLitegraphService } from '@/services/litegraphService' import { useLitegraphService } from '@/services/litegraphService'
import { useCommandStore } from '@/stores/commandStore' import { useCommandStore } from '@/stores/commandStore'

View File

@@ -1,10 +1,10 @@
import { Settings } from '@/schemas/apiSchema' import { type Settings } from '@/schemas/apiSchema'
import type { ComfyApp } from '@/scripts/app' import type { ComfyApp } from '@/scripts/app'
import type { ComfyComponent } from '.' import type { ComfyComponent } from '.'
import { $el } from '../../ui' import { $el } from '../../ui'
import { prop } from '../../utils' import { prop } from '../../utils'
import { ClassList, applyClasses, toggleElement } from '../utils' import { type ClassList, applyClasses, toggleElement } from '../utils'
import type { ComfyPopup } from './popup' import type { ComfyPopup } from './popup'
type ComfyButtonProps = { type ComfyButtonProps = {

View File

@@ -1,6 +1,6 @@
import { $el } from '../../ui' import { $el } from '../../ui'
import { prop } from '../../utils' import { prop } from '../../utils'
import { ClassList, applyClasses } from '../utils' import { type ClassList, applyClasses } from '../utils'
export class ComfyPopup extends EventTarget { export class ComfyPopup extends EventTarget {
element = $el('div.comfyui-popup') element = $el('div.comfyui-popup')

View File

@@ -2,8 +2,12 @@ import { createPinia, setActivePinia } from 'pinia'
import { beforeEach, describe, expect, it, vi } from 'vitest' import { beforeEach, describe, expect, it, vi } from 'vitest'
import { useSelectedLiteGraphItems } from '@/composables/canvas/useSelectedLiteGraphItems' import { useSelectedLiteGraphItems } from '@/composables/canvas/useSelectedLiteGraphItems'
import type { LGraphNode, Positionable } from '@/lib/litegraph/src/litegraph' import type { LGraphNode } from '@/lib/litegraph/src/litegraph'
import { LGraphEventMode, Reroute } from '@/lib/litegraph/src/litegraph' import {
LGraphEventMode,
type Positionable,
Reroute
} from '@/lib/litegraph/src/litegraph'
import { useCanvasStore } from '@/renderer/core/canvas/canvasStore' import { useCanvasStore } from '@/renderer/core/canvas/canvasStore'
import { app } from '@/scripts/app' import { app } from '@/scripts/app'

View File

@@ -1,8 +1,9 @@
// TODO: Fix these tests after migration // TODO: Fix these tests after migration
import { assert, describe, expect, it } from 'vitest' import { assert, describe, expect, it } from 'vitest'
import type { ISlotType, LGraph } from '@/lib/litegraph/src/litegraph' import type { LGraph } from '@/lib/litegraph/src/litegraph'
import { import {
type ISlotType,
LGraphGroup, LGraphGroup,
LGraphNode, LGraphNode,
LiteGraph LiteGraph

View File

@@ -3,11 +3,9 @@ import { beforeEach, describe, expect, it, vi } from 'vitest'
import { nextTick } from 'vue' import { nextTick } from 'vue'
import type { Subgraph } from '@/lib/litegraph/src/litegraph' import type { Subgraph } from '@/lib/litegraph/src/litegraph'
import type { import type { ComfyWorkflow } from '@/platform/workflow/management/stores/workflowStore'
ComfyWorkflow,
LoadedComfyWorkflow
} from '@/platform/workflow/management/stores/workflowStore'
import { import {
type LoadedComfyWorkflow,
useWorkflowBookmarkStore, useWorkflowBookmarkStore,
useWorkflowStore useWorkflowStore
} from '@/platform/workflow/management/stores/workflowStore' } from '@/platform/workflow/management/stores/workflowStore'

View File

@@ -19,6 +19,7 @@
"downlevelIteration": true, "downlevelIteration": true,
"noImplicitOverride": true, "noImplicitOverride": true,
"allowJs": true, "allowJs": true,
"verbatimModuleSyntax": true,
"baseUrl": ".", "baseUrl": ".",
"paths": { "paths": {
"@/*": ["src/*"] "@/*": ["src/*"]