From 025e46b244a1192cf31119c5f9461a20b7fb9f2c Mon Sep 17 00:00:00 2001 From: "Grant J. Butler" Date: Wed, 9 Feb 2022 21:51:41 -0500 Subject: [PATCH] Reformat some things. --- packages/renderer/src/layout/Component.ts | 6 +++--- .../renderer/src/layout/ContainerLayoutNode.ts | 4 ++-- packages/renderer/src/layout/FlexComponent.ts | 10 +++++----- packages/renderer/src/layout/Frame.ts | 2 +- packages/renderer/src/layout/InsetComponent.ts | 14 +++++++------- packages/renderer/src/layout/LayoutExerciser.ts | 6 +++--- packages/renderer/src/layout/LayoutNode.ts | 2 +- packages/renderer/src/layout/Size.ts | 2 +- packages/renderer/src/layout/SourceComponent.ts | 12 ++++++------ packages/renderer/src/layout/SourceLayoutNode.ts | 2 +- packages/renderer/tsconfig.json | 1 + 11 files changed, 31 insertions(+), 30 deletions(-) diff --git a/packages/renderer/src/layout/Component.ts b/packages/renderer/src/layout/Component.ts index ccbc4cc..e8069ee 100644 --- a/packages/renderer/src/layout/Component.ts +++ b/packages/renderer/src/layout/Component.ts @@ -1,7 +1,7 @@ import { v4 as uuidv4 } from 'uuid'; -import Size from './Size' -import LayoutNode from './LayoutNode' -import ContainerComponent from './ContainerComponent' +import type Size from './Size'; +import type LayoutNode from './LayoutNode'; +import type ContainerComponent from './ContainerComponent'; export default class Component { id: string = uuidv4(); diff --git a/packages/renderer/src/layout/ContainerLayoutNode.ts b/packages/renderer/src/layout/ContainerLayoutNode.ts index 0a0e6c3..d6315cd 100644 --- a/packages/renderer/src/layout/ContainerLayoutNode.ts +++ b/packages/renderer/src/layout/ContainerLayoutNode.ts @@ -1,5 +1,5 @@ -import Frame from './Frame' -import LayoutNode from './LayoutNode' +import type Frame from './Frame'; +import LayoutNode from './LayoutNode'; export default class ContainerLayoutNode extends LayoutNode { children: LayoutNode[]; diff --git a/packages/renderer/src/layout/FlexComponent.ts b/packages/renderer/src/layout/FlexComponent.ts index 5dfae19..1af27f8 100644 --- a/packages/renderer/src/layout/FlexComponent.ts +++ b/packages/renderer/src/layout/FlexComponent.ts @@ -1,8 +1,8 @@ -import ContainerLayoutNode from './ContainerLayoutNode' -import ContainerComponent from './ContainerComponent' -import Frame from './Frame' -import Size from './Size' -import LayoutNode from './LayoutNode'; +import ContainerLayoutNode from './ContainerLayoutNode'; +import ContainerComponent from './ContainerComponent'; +import Frame from './Frame'; +import Size from './Size'; +import type LayoutNode from './LayoutNode'; export default class FlexComponent extends ContainerComponent { direction: 'horizontal' | 'vertical' = 'horizontal'; diff --git a/packages/renderer/src/layout/Frame.ts b/packages/renderer/src/layout/Frame.ts index baf6ba6..4646545 100644 --- a/packages/renderer/src/layout/Frame.ts +++ b/packages/renderer/src/layout/Frame.ts @@ -1,4 +1,4 @@ -import Insets from './Insets' +import type Insets from './Insets'; interface FrameStyleObject { top: string diff --git a/packages/renderer/src/layout/InsetComponent.ts b/packages/renderer/src/layout/InsetComponent.ts index d693098..4dc34b7 100644 --- a/packages/renderer/src/layout/InsetComponent.ts +++ b/packages/renderer/src/layout/InsetComponent.ts @@ -1,10 +1,10 @@ -import Component from './Component' -import LayoutNode from './LayoutNode' -import Size from './Size' -import ContainerLayoutNode from './ContainerLayoutNode' -import Frame from './Frame' -import ContainerComponent from './ContainerComponent' -import Insets from './Insets' +import type Component from './Component'; +import type LayoutNode from './LayoutNode'; +import type Size from './Size'; +import ContainerLayoutNode from './ContainerLayoutNode'; +import Frame from './Frame'; +import ContainerComponent from './ContainerComponent'; +import Insets from './Insets'; export default class InsetComponent extends ContainerComponent { insets = new Insets(0, 0, 0, 0); diff --git a/packages/renderer/src/layout/LayoutExerciser.ts b/packages/renderer/src/layout/LayoutExerciser.ts index a017eee..425e15a 100644 --- a/packages/renderer/src/layout/LayoutExerciser.ts +++ b/packages/renderer/src/layout/LayoutExerciser.ts @@ -1,6 +1,6 @@ -import Component from './Component' -import LayoutNode from './LayoutNode' -import Size from './Size' +import type Component from './Component'; +import type LayoutNode from './LayoutNode'; +import type Size from './Size'; export default class LayoutExerciser { execute(component: Component, size: Size): LayoutNode { diff --git a/packages/renderer/src/layout/LayoutNode.ts b/packages/renderer/src/layout/LayoutNode.ts index c6bc16c..c141b20 100644 --- a/packages/renderer/src/layout/LayoutNode.ts +++ b/packages/renderer/src/layout/LayoutNode.ts @@ -1,4 +1,4 @@ -import Frame from './Frame' +import type Frame from './Frame'; export default class LayoutNode { id: string; diff --git a/packages/renderer/src/layout/Size.ts b/packages/renderer/src/layout/Size.ts index a58ef4b..6a86609 100644 --- a/packages/renderer/src/layout/Size.ts +++ b/packages/renderer/src/layout/Size.ts @@ -1,4 +1,4 @@ -import Insets from './Insets' +import type Insets from './Insets'; export default class Size { width: number; diff --git a/packages/renderer/src/layout/SourceComponent.ts b/packages/renderer/src/layout/SourceComponent.ts index 5b23f99..c8e72f3 100644 --- a/packages/renderer/src/layout/SourceComponent.ts +++ b/packages/renderer/src/layout/SourceComponent.ts @@ -1,9 +1,9 @@ -import Component from './Component' -import Size from './Size' -import LayoutNode from './LayoutNode' -import Frame from './Frame' -import Insets from './Insets' -import SourceLayoutNode from './SourceLayoutNode' +import Component from './Component'; +import Size from './Size'; +import LayoutNode from './LayoutNode'; +import Frame from './Frame'; +import Insets from './Insets'; +import SourceLayoutNode from './SourceLayoutNode'; import type { Source } from '../../../shared/src/obs'; export default class SourceComponent extends Component { diff --git a/packages/renderer/src/layout/SourceLayoutNode.ts b/packages/renderer/src/layout/SourceLayoutNode.ts index b3fea7a..f1a726e 100644 --- a/packages/renderer/src/layout/SourceLayoutNode.ts +++ b/packages/renderer/src/layout/SourceLayoutNode.ts @@ -1,5 +1,5 @@ import type { Source } from '../../../shared/src/obs'; -import Frame from './Frame' +import type Frame from './Frame'; import LayoutNode from './LayoutNode'; export default class SourceLayoutNode extends LayoutNode { diff --git a/packages/renderer/tsconfig.json b/packages/renderer/tsconfig.json index a2fb6d0..b222a1b 100644 --- a/packages/renderer/tsconfig.json +++ b/packages/renderer/tsconfig.json @@ -7,6 +7,7 @@ "skipLibCheck": true, "strict": true, "isolatedModules": true, + "allowSyntheticDefaultImports": true, "types" : ["node"],