Skip to content
This repository has been archived by the owner on Jul 18, 2024. It is now read-only.

Commit

Permalink
lint types.
Browse files Browse the repository at this point in the history
  • Loading branch information
m1k1o committed May 9, 2024
1 parent 3a0bd06 commit d891d5b
Show file tree
Hide file tree
Showing 18 changed files with 30 additions and 31 deletions.
2 changes: 1 addition & 1 deletion src/component/internal/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type { Connection, WebRTCStats } from '../types/state'
import { Reconnector } from './reconnector'
import { WebsocketReconnector } from './reconnector/websocket'
import { WebrtcReconnector } from './reconnector/webrtc'
import { Logger } from '../utils/logger'
import type { Logger } from '../utils/logger'

const WEBRTC_RECONN_MAX_LOSS = 25
const WEBRTC_RECONN_FAILED_ATTEMPTS = 5
Expand Down
4 changes: 2 additions & 2 deletions src/component/internal/control.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as EVENT from '../types/events'
import * as message from '../types/messages'
import type * as message from '../types/messages'

import EventEmitter from 'eventemitter3'
import { NekoConnection } from './connection'
import type { NekoConnection } from './connection'
import type { Control } from '../types/state'

export interface NekoControlEvents {
Expand Down
4 changes: 2 additions & 2 deletions src/component/internal/logger.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NekoWebSocket } from './websocket'
import type { NekoWebSocket } from './websocket'
import * as EVENT from '../types/events'
import * as message from '../types/messages'
import type * as message from '../types/messages'
import { Logger } from '../utils/logger'

const MAX_LOG_MESSAGES = 25
Expand Down
4 changes: 2 additions & 2 deletions src/component/internal/messages.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import * as EVENT from '../types/events'
import * as message from '../types/messages'
import type * as message from '../types/messages'

import EventEmitter from 'eventemitter3'
import type { AxiosProgressEvent } from 'axios'
import { Logger } from '../utils/logger'
import { NekoConnection } from './connection'
import type { NekoConnection } from './connection'
import type NekoState from '../types/state'
import type { Settings } from '../types/state'

Expand Down
4 changes: 2 additions & 2 deletions src/component/internal/reconnector/webrtc.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as EVENT from '../../types/events'
import type { Connection } from '../../types/state'

import { NekoWebSocket } from '../websocket'
import { NekoWebRTC } from '../webrtc'
import type { NekoWebSocket } from '../websocket'
import type { NekoWebRTC } from '../webrtc'

import { ReconnectorAbstract } from '.'

Expand Down
2 changes: 1 addition & 1 deletion src/component/internal/reconnector/websocket.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Connection } from '../../types/state'

import { NekoWebSocket } from '../websocket'
import type { NekoWebSocket } from '../websocket'

import { ReconnectorAbstract } from '.'

Expand Down
2 changes: 1 addition & 1 deletion src/component/main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ import { ref, watch, computed, reactive, onMounted, onBeforeUnmount } from 'vue'
//export * as StateModels from './types/state'
//export * as webrtcTypes from './types/webrtc'
import { Configuration } from './api/configuration'
import type { Configuration } from './api/configuration'
import type { AxiosInstance, AxiosProgressEvent } from 'axios'
import ResizeObserver from 'resize-observer-polyfill'
Expand Down
4 changes: 2 additions & 2 deletions src/component/overlay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ import { NewKeyboard } from './utils/keyboard'
import GestureHandlerInit from './utils/gesturehandler'
import { KeyTable, keySymsRemap } from './utils/keyboard-remapping'
import { getFilesFromDataTansfer } from './utils/file-upload'
import { NekoControl } from './internal/control'
import { NekoWebRTC } from './internal/webrtc'
import type { NekoControl } from './internal/control'
import type { NekoWebRTC } from './internal/webrtc'
// Wheel thresholds
const WHEEL_STEP = 53 // Pixels needed for one step
Expand Down
2 changes: 1 addition & 1 deletion src/component/screencast.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<script lang="ts" setup>
import { ref, watch, onMounted, onBeforeUnmount } from 'vue'
import { RoomApi } from './api'
import type { RoomApi } from './api'
const REFRESH_RATE = 1e3
const ERROR_DELAY_MS = 2500
Expand Down
2 changes: 1 addition & 1 deletion src/lib.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Vue from 'vue'
import type Vue from 'vue'
import Neko from './component/main.vue'

// TODO
Expand Down
2 changes: 1 addition & 1 deletion src/page/components/chat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@

<script lang="ts" setup>
import { ref, watch, onMounted } from 'vue'
import Neko from '@/component/main.vue'
import type Neko from '@/component/main.vue'
const length = 512 // max length of message
Expand Down
4 changes: 2 additions & 2 deletions src/page/components/connect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
<style lang="scss"></style>

<script lang="ts" setup>
import { ref, watch, onMounted, onBeforeUnmount } from 'vue'
import Neko from '@/component/main.vue'
import { ref, onMounted } from 'vue'
import type Neko from '@/component/main.vue'
const props = defineProps<{
neko: typeof Neko
Expand Down
4 changes: 2 additions & 2 deletions src/page/components/controls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@
</style>

<script lang="ts" setup>
import { ref, watch, computed, onMounted, onBeforeUnmount } from 'vue'
import Neko from '@/component/main.vue'
import { computed } from 'vue'
import type Neko from '@/component/main.vue'
const props = defineProps<{
neko: typeof Neko
Expand Down
4 changes: 2 additions & 2 deletions src/page/components/events.vue
Original file line number Diff line number Diff line change
Expand Up @@ -620,8 +620,8 @@
</style>

<script lang="ts" setup>
import { ref, watch, computed, onMounted, onBeforeUnmount } from 'vue'
import Neko from '@/component/main.vue'
import { ref, watch, computed } from 'vue'
import type Neko from '@/component/main.vue'
import NekoColor from './color.vue'
const props = defineProps<{
Expand Down
4 changes: 2 additions & 2 deletions src/page/components/header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@
</style>

<script lang="ts" setup>
import { ref, watch, computed, onMounted, onBeforeUnmount } from 'vue'
import Neko from '@/component/main.vue'
import { ref, watch } from 'vue'
import type Neko from '@/component/main.vue'
const props = defineProps<{
neko: typeof Neko
Expand Down
4 changes: 2 additions & 2 deletions src/page/components/media.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
<style lang="scss" scoped></style>

<script lang="ts" setup>
import { ref, watch, computed, onMounted, onBeforeUnmount } from 'vue'
import Neko from '@/component/main.vue'
import { ref, onMounted } from 'vue'
import type Neko from '@/component/main.vue'
const props = defineProps<{
neko: typeof Neko
Expand Down
4 changes: 2 additions & 2 deletions src/page/components/members.vue
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,8 @@
</style>

<script lang="ts" setup>
import { ref, watch, computed, onMounted, onBeforeUnmount } from 'vue'
import Neko from '@/component/main.vue'
import { ref, computed, onMounted } from 'vue'
import type Neko from '@/component/main.vue'
// TODO: get from lib ts?
import type * as ApiModels from '@/component/api/models'
Expand Down
5 changes: 2 additions & 3 deletions src/page/plugins/filetransfer/component.vue
Original file line number Diff line number Diff line change
Expand Up @@ -274,11 +274,10 @@

<script lang="ts" setup>
import { ref, reactive, computed, onMounted } from 'vue'
import Neko from '@/component/main.vue'
import type Neko from '@/component/main.vue'
import type { FileTransfer, Message, Item } from './types'
import { FILETRANSFER_UPDATE } from './types'
import { FiletransferApi } from './api'
import * as ApiModels from './api/models'
const props = defineProps<{
neko: typeof Neko
Expand All @@ -288,7 +287,7 @@ const props = defineProps<{
const api = props.neko.withApi(FiletransferApi) as FiletransferApi
const enabled = ref(false)
const enabledForMe = computed(() => enabled && (props.neko.is_admin || (!props.neko.is_admin && !isLocked.value)))
const enabledForMe = computed(() => enabled.value && (props.neko.is_admin || (!props.neko.is_admin && !isLocked.value)))
const cwd = ref('')
const files = ref<Item[]>([])
const transfers = reactive<FileTransfer[]>([])
Expand Down

0 comments on commit d891d5b

Please sign in to comment.