Skip to content

Commit 4ce1bbf

Browse files
committed
fix: fixed all typescript errors
1 parent 1a09064 commit 4ce1bbf

File tree

7 files changed

+59
-52
lines changed

7 files changed

+59
-52
lines changed

package.json

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -109,65 +109,65 @@
109109
},
110110
"dependencies": {
111111
"@alanscodelog/utils": "4.0.0-beta.16",
112-
"@fortawesome/vue-fontawesome": "^3.0.3",
112+
"@fortawesome/vue-fontawesome": "^3.0.8",
113113
"@nuxt/types": "^2.17.3",
114114
"colord": "^2.9.3",
115-
"colorjs.io": "^0.4.5",
115+
"colorjs.io": "^0.5.0",
116116
"metamorphosis": "^0.2.3",
117-
"tailwind-merge": "^1.14.0"
117+
"tailwind-merge": "^2.3.0"
118118
},
119119
"devDependencies": {
120120
"@alanscodelog/commitlint-config": "^3.0.1",
121121
"@alanscodelog/eslint-config": "5.0.0-beta.3",
122122
"@alanscodelog/semantic-release-config": "^4.1.2",
123-
"@alanscodelog/tsconfigs": "^3.2.0",
124-
"@fortawesome/fontawesome-svg-core": "^6.4.2",
125-
"@fortawesome/free-regular-svg-icons": "^6.4.2",
126-
"@fortawesome/free-solid-svg-icons": "^6.4.2",
123+
"@alanscodelog/tsconfigs": "^4.0.1",
124+
"@commitlint/cli": "^19.3.0",
125+
"@fortawesome/fontawesome-svg-core": "^6.5.2",
126+
"@fortawesome/free-regular-svg-icons": "^6.5.2",
127+
"@fortawesome/free-solid-svg-icons": "^6.5.2",
127128
"@fortawesome/vue-fontawesome": "^3.0.3",
128-
"@nuxt/kit": "^3.8.0",
129-
"@nuxt/schema": "^3.9.3",
130-
"@nuxtjs/tailwindcss": "^6.8.1",
129+
"@nuxt/kit": "^3.11.2",
130+
"@nuxt/schema": "^3.11.2",
131+
"@nuxtjs/tailwindcss": "^6.12.0",
131132
"@rollup/plugin-node-resolve": "^15.2.3",
132-
"@storybook/addon-a11y": "7.2.3",
133-
"@storybook/addon-actions": "7.2.3",
134-
"@storybook/addon-essentials": "7.2.3",
135-
"@storybook/addon-links": "7.2.3",
136-
"@storybook/addon-storysource": "7.2.3",
137-
"@storybook/vue3": "7.2.3",
138-
"@storybook/vue3-vite": "7.2.3",
139-
"@types/node": "^20.8.10",
140-
"@vitejs/plugin-legacy": "^4.1.1",
141-
"@vitejs/plugin-vue": "^4.4.0",
142-
"@vue/runtime-core": "^3.4.15",
143-
"@vue/runtime-dom": "^3.4.15",
144-
"@vueuse/components": "^10.5.0",
145-
"@vueuse/core": "^10.5.0",
146-
"autoprefixer": "^10.4.16",
147-
"commitlint": "^17.8.1",
133+
"@storybook/addon-a11y": "8.1.4",
134+
"@storybook/addon-actions": "8.1.4",
135+
"@storybook/addon-essentials": "8.1.4",
136+
"@storybook/addon-links": "8.1.4",
137+
"@storybook/addon-storysource": "8.1.4",
138+
"@storybook/vue3": "8.1.4",
139+
"@storybook/vue3-vite": "8.1.4",
140+
"@types/node": "^20.12.12",
141+
"@vitejs/plugin-legacy": "^5.4.0",
142+
"@vitejs/plugin-vue": "^5.0.4",
143+
"@vue/runtime-core": "^3.4.27",
144+
"@vue/runtime-dom": "^3.4.27",
145+
"@vueuse/components": "^10.10.0",
146+
"@vueuse/core": "^10.10.0",
147+
"autoprefixer": "^10.4.19",
148148
"defu": "^6.1.4",
149-
"fast-glob": "^3.3.1",
149+
"fast-glob": "^3.3.2",
150150
"husky": "^9.0.11",
151151
"indexit": "2.1.0-beta.3",
152-
"madge": "^6.1.0",
153-
"postcss": "^8.4.31",
152+
"madge": "^7.0.0",
153+
"postcss": "^8.4.38",
154154
"postcss-comment": "^2.0.0",
155-
"postcss-import": "^15.1.0",
156-
"postcss-nesting": "^12.0.1",
157-
"react": "^18.2.0",
158-
"react-dom": "^18.2.0",
159-
"sass": "^1.69.5",
155+
"postcss-import": "^16.1.0",
156+
"postcss-nesting": "^12.1.5",
157+
"react": "^18.3.1",
158+
"react-dom": "^18.3.1",
159+
"sass": "^1.77.2",
160160
"semantic-release": "^23.1.1",
161-
"storybook": "7.2.3",
161+
"storybook": "8.1.4",
162162
"storybook-tailwind-dark-mode": "^1.0.22",
163-
"tailwindcss": "^3.3.5",
164-
"ts-node": "^10.9.1",
165-
"typescript": "^5.2.2",
166-
"vite": "^4.5.0",
163+
"tailwindcss": "^3.4.3",
164+
"ts-node": "^10.9.2",
165+
"typescript": "^5.4.5",
166+
"vite": "^5.2.12",
167167
"vite-plugin-externalize-deps": "^0.8.0",
168168
"vue": "^3.4.27",
169-
"vue-loader": "^17.3.1",
170-
"vue-tsc": "^1.8.27"
169+
"vue-loader": "^17.4.2",
170+
"vue-tsc": "^2.0.19"
171171
},
172172
"author": "Alan <alanscodelog@gmail.com>",
173173
"repository": "https://github.com/alanscodelog/vue-components",

src/components/LibInput/LibInput.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ const suggestionProps = computed(() => ({
310310
restrictToSuggestions: props.restrictToSuggestions,
311311
suggestionLabel: props.suggestionLabel,
312312
suggestionsFilter: props.suggestionsFilter,
313-
modelValue: modelValue.value,
313+
modelValue: modelValue.value.toString(),
314314
inputValue: inputValue.value,
315315
canOpen: canOpen.value,
316316
onSubmit: (e: T) => {

src/components/LibPopup/LibPopup.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
p-0
1313
backdrop:bg-transparent
1414
`,
15-
attrs.class
15+
attrs.class as any
1616
)"
1717
v-bind="{...attrs, class:undefined}"
1818
:is="useBackdrop ? 'dialog' : 'div'"
@@ -103,8 +103,8 @@ const recompute = (): void => {
103103
const spaceBottom = (veil.y + veil.height) - (el.y + el.height)
104104
105105
const { preferredHorizontal, preferredVertical } = props
106-
let maxWidth: number
107-
let maxHeight: number
106+
let maxWidth: number | undefined
107+
let maxHeight: number | undefined
108108
/* eslint-disable no-labels */
109109
outerloop:
110110
for (const type of preferredHorizontal) {

src/composables/useScrollNearContainerEdges.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ export const useScrollNearContainerEdges = ({
5454
timerInterval?: number
5555
}): {
5656
scrollEdges: (clientX: number, clientY: number, overrideUseTimer?: boolean) => void
57-
scrollIndicator: Ref<{ left: boolean, right: boolean, down: boolean, up: boolean }>
57+
/** Reactive. */
58+
scrollIndicator: { left: boolean, right: boolean, down: boolean, up: boolean }
5859
resetScrollIndicator: () => void
5960
clearScrollInterval: () => void
6061
isScrolling: Ref<boolean>

src/helpers/twMerge.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import { extendTailwindMerge } from "tailwind-merge"
22

33

4-
export const twMerge = extendTailwindMerge({
5-
classGroups: {
6-
"focus-outline": [{ "focus-outline": ["", "no-offset", "none"]}],
7-
},
4+
export const twMerge = extendTailwindMerge<"focus-outline">({
5+
extend: {
6+
classGroups: {
7+
"focus-outline": [{ "focus-outline": ["", "no-offset", "none"]}],
8+
},
9+
}
810
})

src/nuxt/plugins/vue-plugin.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ export default defineNuxtPlugin({
1111
name: "components-plugin",
1212
async setup(nuxtApp: NuxtApp) {
1313
const config = useRuntimeConfig().public.witchcraftComponents
14-
const app = nuxtApp.vueApp
14+
const app = (nuxtApp as any).vueApp
1515
const directives = (isArray(config?.directives)
1616
? (await Promise.all(config.directives.map(async (name: string) => (import(`../../directives/${name}.ts`))))).map(_ => Object.values(_)[0])
17+
// @ts-expect-error ts filetype needed for nuxt
1718
: await import(`../../directives/index.ts`))
1819
registerDirectives(app, Object.values(directives))
1920
},

src/vue/VueComponentsPlugin.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@ import type { App, Plugin } from "vue"
33
import { registerComponents } from "./registerComponents.js"
44
import { registerDirectives } from "./registerDirectives.js"
55

6-
import { components, directives } from "../main.lib.js"
6+
export * as directives from "../directives/index.js"
7+
export * as components from "../components/index.js"
78

89
// eslint-disable-next-line @typescript-eslint/naming-convention
910
export const VueComponentsPlugin: Plugin = {
1011
install(app: App) {
12+
// @ts-expect-error .
1113
registerComponents(app, components)
14+
// @ts-expect-error .
1215
registerDirectives(app, directives)
1316
},
1417
}

0 commit comments

Comments
 (0)