Prefix all type imports with the 'type' keyword where appropriate

This commit is contained in:
Keavon Chambers
2022-08-25 15:38:21 -07:00
parent 3a84de32ac
commit 881ad667d7
63 changed files with 188 additions and 179 deletions
@@ -27,17 +27,17 @@ import Workspace from "@/components/window/workspace/Workspace.vue";
export type ApplicationPlatform = "Windows" | "Mac" | "Linux" | "Web";
export default defineComponent({
components: {
LayoutCol,
TitleBar,
Workspace,
StatusBar,
},
data() {
return {
platform: "Web" as ApplicationPlatform,
maximized: true,
};
},
components: {
LayoutCol,
StatusBar,
TitleBar,
Workspace,
},
});
</script>
@@ -49,7 +49,7 @@
import { defineComponent } from "vue";
import { platformIsMac } from "@/utility-functions/platform";
import { HintData, HintInfo, KeysGroup, UpdateInputHints } from "@/wasm-communication/messages";
import { type HintData, type HintInfo, type KeysGroup, UpdateInputHints } from "@/wasm-communication/messages";
import LayoutRow from "@/components/layout/LayoutRow.vue";
import Separator from "@/components/widgets/labels/Separator.vue";
@@ -74,9 +74,9 @@ export default defineComponent({
});
},
components: {
UserInputLabel,
Separator,
LayoutRow,
Separator,
UserInputLabel,
},
});
</script>
@@ -38,7 +38,7 @@
</style>
<script lang="ts">
import { defineComponent, PropType } from "vue";
import { defineComponent, type PropType } from "vue";
import LayoutRow from "@/components/layout/LayoutRow.vue";
import MenuBarInput from "@/components/widgets/inputs/MenuBarInput.vue";
@@ -64,12 +64,12 @@ export default defineComponent({
},
},
components: {
LayoutRow,
MenuBarInput,
WindowTitle,
WindowButtonsWindows,
WindowButtonsMac,
WindowButtonsWeb,
LayoutRow,
WindowButtonsWindows,
WindowTitle,
},
});
</script>
@@ -39,7 +39,7 @@
</style>
<script lang="ts">
import { defineComponent, PropType } from "vue";
import { defineComponent, type PropType } from "vue";
import LayoutRow from "@/components/layout/LayoutRow.vue";
@@ -52,8 +52,8 @@ export default defineComponent({
},
components: {
IconLabel,
TextLabel,
LayoutRow,
TextLabel,
},
});
</script>
@@ -38,18 +38,18 @@
</style>
<script lang="ts">
import { defineComponent, PropType } from "vue";
import { defineComponent, type PropType } from "vue";
import LayoutRow from "@/components/layout/LayoutRow.vue";
import IconLabel from "@/components/widgets/labels/IconLabel.vue";
export default defineComponent({
props: {
maximized: { type: Boolean as PropType<boolean>, default: false },
},
components: {
IconLabel,
LayoutRow,
},
props: {
maximized: { type: Boolean as PropType<boolean>, default: false },
},
});
</script>
@@ -14,7 +14,7 @@
</style>
<script lang="ts">
import { defineComponent, PropType } from "vue";
import { defineComponent, type PropType } from "vue";
import LayoutRow from "@/components/layout/LayoutRow.vue";
@@ -209,11 +209,11 @@
</style>
<script lang="ts">
import { defineComponent, PropType } from "vue";
import { defineComponent, type PropType } from "vue";
import { platformIsMac } from "@/utility-functions/platform";
import { KeysGroup, Key } from "@/wasm-communication/messages";
import { type KeysGroup, type Key } from "@/wasm-communication/messages";
import LayoutCol from "@/components/layout/LayoutCol.vue";
import LayoutRow from "@/components/layout/LayoutRow.vue";
@@ -228,7 +228,7 @@ import IconLabel from "@/components/widgets/labels/IconLabel.vue";
import TextLabel from "@/components/widgets/labels/TextLabel.vue";
import UserInputLabel from "@/components/widgets/labels/UserInputLabel.vue";
const panelComponents = {
const PANEL_COMPONENTS = {
Document,
IconButton,
LayerTree,
@@ -237,7 +237,7 @@ const panelComponents = {
Properties,
TextButton,
};
type PanelTypes = keyof typeof panelComponents;
type PanelTypes = keyof typeof PANEL_COMPONENTS;
export default defineComponent({
inject: ["editor"],
@@ -269,12 +269,12 @@ export default defineComponent({
},
},
components: {
IconLabel,
LayoutCol,
LayoutRow,
IconLabel,
TextLabel,
UserInputLabel,
...panelComponents,
...PANEL_COMPONENTS,
},
});
</script>
@@ -75,12 +75,6 @@ const MIN_PANEL_SIZE = 100;
export default defineComponent({
inject: ["workspace", "portfolio", "dialog", "editor"],
components: {
LayoutRow,
LayoutCol,
Panel,
DialogModal,
},
computed: {
activeDocumentIndex() {
return this.portfolio.state.activeDocumentIndex;
@@ -142,5 +136,11 @@ export default defineComponent({
newActiveTab.scrollIntoView();
},
},
components: {
DialogModal,
LayoutCol,
LayoutRow,
Panel,
},
});
</script>