From f92974377df0ac3fc784055e3d551911916273fb Mon Sep 17 00:00:00 2001 From: Olga Bulat Date: Tue, 28 Jun 2022 12:14:46 +0300 Subject: [PATCH] Use `defineComponent`, add prop types and emit types (#1480) * Use `defineComponent`, add prop types and emit types * Add more files to tsconfig * Remove changes that cannot be added to tsconfig --- src/components/VAllResultsGrid/VAudioCell.vue | 13 +++++-- src/components/VErrorSection/VErrorImage.vue | 3 +- .../VFilters/VLicenseExplanation.vue | 14 +++++--- src/components/VLicense/VLicense.vue | 3 +- src/components/VLicense/VLicenseElements.vue | 4 +-- .../VLogoLoader/VLogoLoader.types.js | 13 ------- src/components/VLogoLoader/VLogoLoader.vue | 17 +++++++--- src/components/VMediaTag/VMediaTag.vue | 8 +++-- .../VSkeleton/VAudioTrackSkeleton.vue | 8 +++-- src/components/VSkeleton/VBone.vue | 8 +++-- src/components/VSkeleton/VGridSkeleton.vue | 13 ++++--- tsconfig.json | 34 +++++++++++-------- 12 files changed, 77 insertions(+), 61 deletions(-) delete mode 100644 src/components/VLogoLoader/VLogoLoader.types.js diff --git a/src/components/VAllResultsGrid/VAudioCell.vue b/src/components/VAllResultsGrid/VAudioCell.vue index d31e5f6722..1e863c4d19 100644 --- a/src/components/VAllResultsGrid/VAudioCell.vue +++ b/src/components/VAllResultsGrid/VAudioCell.vue @@ -2,13 +2,20 @@ - diff --git a/src/components/VErrorSection/VErrorImage.vue b/src/components/VErrorSection/VErrorImage.vue index a477a5d2ee..7cde19e325 100644 --- a/src/components/VErrorSection/VErrorImage.vue +++ b/src/components/VErrorSection/VErrorImage.vue @@ -15,7 +15,7 @@ import { computed, defineComponent, PropType } from '@nuxtjs/composition-api' import type { License, LicenseVersion } from '~/constants/license' -import { ErrorCode, errorCodes } from '~/constants/errors' +import type { ErrorCode } from '~/constants/errors' import { AttributableMedia, getAttribution } from '~/utils/attribution-html' import { useI18n } from '~/composables/use-i18n' @@ -40,7 +40,6 @@ export default defineComponent({ errorCode: { type: String as PropType, required: true, - validator: (val: ErrorCode) => errorCodes.includes(val), }, }, setup(props) { diff --git a/src/components/VFilters/VLicenseExplanation.vue b/src/components/VFilters/VLicenseExplanation.vue index ba877cd0b9..a1651fac27 100644 --- a/src/components/VFilters/VLicenseExplanation.vue +++ b/src/components/VFilters/VLicenseExplanation.vue @@ -35,8 +35,12 @@ - diff --git a/src/components/VLicense/VLicense.vue b/src/components/VLicense/VLicense.vue index ab44ec0265..474450ad70 100644 --- a/src/components/VLicense/VLicense.vue +++ b/src/components/VLicense/VLicense.vue @@ -19,7 +19,7 @@ diff --git a/src/components/VSkeleton/VAudioTrackSkeleton.vue b/src/components/VSkeleton/VAudioTrackSkeleton.vue index 751f3b9f4b..2513015dc1 100644 --- a/src/components/VSkeleton/VAudioTrackSkeleton.vue +++ b/src/components/VSkeleton/VAudioTrackSkeleton.vue @@ -30,15 +30,17 @@ -