Skip to content

Commit

Permalink
[O] Optimize imports
Browse files Browse the repository at this point in the history
  • Loading branch information
hykilpikonna committed Feb 12, 2024
1 parent 4e93412 commit 5a2a950
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/env.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/// <reference types="vite/client" />

declare module '*.vue' {
import { DefineComponent } from 'vue'
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
import {DefineComponent} from 'vue'
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
const component: DefineComponent<{}, {}, any>
export default component
}
5 changes: 2 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { App } from 'vue'
import {App} from 'vue'
import * as components from './views'
import './css/global.sass'

export default function install (app: App) {
for (const key in components) {
app.component(key, components[key])
}
}

import './css/global.sass'

export * from './views'
export * from './logic'
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createApp } from 'vue'
import {createApp} from 'vue'
import App from './App.vue'

createApp(App).mount('#app')
3 changes: 1 addition & 2 deletions src/views/FileView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,9 @@

<script lang="ts">
import {Options, Vue} from 'vue-class-component';
import {TGFile, TGPollFile, TGLocationFile} from "@/logic/models";
import {TGFile, TGLocationFile, TGPollFile} from "@/logic/models";
import {Emit, Prop, Ref} from "vue-property-decorator";
import {durationFmt, sizeFmt} from "@/logic/formatter";
import fileDownload from "js-file-download"
function downloadURI(uri: string, name: string) {
let link = document.createElement("a");
Expand Down
2 changes: 1 addition & 1 deletion src/views/Location.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import {Options, Vue} from 'vue-class-component';
import "leaflet/dist/leaflet.css";
import "leaflet"
import { LMap, LTileLayer, LMarker } from "@vue-leaflet/vue-leaflet";
import {LMap, LMarker, LTileLayer} from "@vue-leaflet/vue-leaflet";
import {Prop} from "vue-property-decorator";
import {TGLocationFile} from "@/logic";
Expand Down
2 changes: 1 addition & 1 deletion src/views/TgBlog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import moment from "moment";
import {Prop, Ref} from "vue-property-decorator";
import {Post, TGFile} from "@/logic/models";
import PostView from "@/views/PostView.vue";
import { initSpoilers } from '@/logic/spoilers';
import {initSpoilers} from '@/logic/spoilers';
import ImageViewer, {TrackedImage} from "@/views/ImageViewer.vue";
@Options({components: {
Expand Down

0 comments on commit 5a2a950

Please sign in to comment.