feat: add type info

This commit is contained in:
Dominik Pschenitschni 2022-09-27 22:54:37 +02:00
parent 480aa8813e
commit 0182695cda
Signed by: dpschen
GPG Key ID: B257AC0149F43A77
4 changed files with 12 additions and 9 deletions

View File

@ -35,7 +35,7 @@ export function setupMarkdownRenderer(checkboxId: string) {
return isLocal ? html : html.replace(/^<a /, '<a target="_blank" rel="noreferrer noopener nofollow" ')
},
},
highlight(code, language) {
highlight(code: string, language: string) {
const validLanguage = hljs.getLanguage(language) ? language : 'plaintext'
return hljs.highlight(code, {language: validLanguage}).value
},

View File

@ -1,21 +1,22 @@
// Save the current list view to local storage
import type { IList } from '@/modelTypes/IList'
type ListView = Record<IList['id'], string>
const DEFAULT_LIST_VIEW = 'list.list' as const
// We use local storage and not a store here to make it persistent across reloads.
export const saveListView = (listId: IList['id'], routeName: string) => {
/**
* Save the current list view to local storage
*/
export function saveListView(listId: IList['id'], routeName: string) {
if (routeName.includes('settings.')) {
return
}
if (!listId) {
return
}
// We use local storage and not the store here to make it persistent across reloads.
const savedListView = localStorage.getItem('listView')
let savedListViewJson: ListView | false = false
if (savedListView !== null) {

View File

@ -1,6 +1,8 @@
import type { App } from 'vue'
import type { Router } from 'vue-router'
import {VERSION} from './version.json'
export default async function setupSentry(app, router) {
export default async function setupSentry(app: App, router: Router) {
const Sentry = await import('@sentry/vue')
const {Integrations} = await import('@sentry/tracing')

View File

@ -6,7 +6,7 @@ import AbstractService from '../abstractService'
export default class AbstractMigrationFileService extends AbstractService {
serviceUrlKey = ''
constructor(serviceUrlKey: '') {
constructor(serviceUrlKey: string) {
super({
create: '/migration/' + serviceUrlKey + '/migrate',
})