Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Finish TS-ifying composables and constants #1927

Merged
merged 2 commits into from
Oct 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions src/composables/types.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@ export function useI18nResultsCount() {
const i18n = useI18n()
const getLocaleFormattedNumber = useGetLocaleFormattedNumber()

/**
* @param {number} resultsCount
* @returns {string}
*/
const getI18nCount = (resultsCount) => {
const getI18nCount = (resultsCount: number) => {
const countKey =
resultsCount === 0
? 'noResult'
Expand Down
11 changes: 8 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,15 @@
"src/components/VModal/VInputModal.vue",
"src/pages/feedback.vue",
"src/pages/search-help.vue",
"src/composables/types.js",

// This section cannot be converted to TypeScript because it's used in non-TS contexts (like Tailwind configuration)
"src/constants/screens.js",
/**
* Some files from this section cannot be converted to TypeScript because they are
* used in non-TS contexts (like Tailwind configuration). Therefore they're left as
* "vanilla JavaScript" with JSDoc based type annotations. This allows us to check
* them with TypeScript without introducing syntax changes that are not compatible
* with other tools we rely on.
*/
"src/constants/**/*",
"src/server-middleware/healthcheck.js"
],
"exclude": ["node_modules"],
Expand Down