Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module 'v-calendar' should export types from utils package #1472

Open
AdrienLeblanc opened this issue May 13, 2024 · 2 comments
Open

Module 'v-calendar' should export types from utils package #1472

AdrienLeblanc opened this issue May 13, 2024 · 2 comments

Comments

@AdrienLeblanc
Copy link

AdrienLeblanc commented May 13, 2024

Hello !

Context :

We are currently using v-calendar 3.1.2 and are facing a problem with some types not being properly exported by 'v-calendar' module.
Our Vue project is built with Vite and it seems that Vite is not capable of resolving an import at the start.

image

In fact, we import { AttributeConfig } from 'v-calendar/dist/types/src/utils/attribute' for typing purposes to make the code clearer, sadly it is currently not exported by the 'v-calendar' module in the beginning. I tried to configure my project to bypass this warning, in vain.

Proposed solution:

Is it possible to add the different types to the exports of the module ? So we can use proper typing on our side.
AttributeConfig is not the only one, the goal would be to export the maximum of types developers might use in the future also.

Thanks !

@cojohnson1999
Copy link

I'm facing the same problem with V-Calendar version 3.1.2 with types exported from v-calendar/dist/types/src/utils/date/helpers. When importing the DateParts interface for typing purposes, I get the following Vite build error:

error TS2307: Cannot find module 'v-calendar/dist/types/src/utils/date/helpers' or its corresponding type declarations.

import { DateParts } from 'v-calendar/dist/types/src/utils/date/helpers';

Having these types be exported properly would be great.

@vasilistotskas
Copy link

I have the same issue in nuxt3.14 :

Tried both ways:

import type { DatePickerDate, DatePickerRangeObject } from 'v-calendar/src/use/datePicker'
import type { DatePickerDate, DatePickerRangeObject } from 'v-calendar/dist/types/src/use/datePicker'

Getting warning:
Vue: Cannot find module v-calendar/ src/ use/ datePicker or its corresponding type declarations.
Vue: Cannot find module v-calendar/ dist/ types/ src/ use/ datePicker or its corresponding type declarations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants