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

error typescript 2589 #91

Open
sergefabre opened this issue Jan 23, 2025 · 1 comment
Open

error typescript 2589 #91

sergefabre opened this issue Jan 23, 2025 · 1 comment

Comments

@sergefabre
Copy link

Package version

@vinejs/[email protected] | MIT | deps: 8 | versions: 19

Describe the bug

Hello,

I encounter an error after updating from version 2.1.0 to version 3.0.0 on a snippet which was fine in 2.1.0.
The typescript error 2589 is raised by the IDE, the build also fails now.

I tried commenting some lines to identify the problematic code.
The error only seems to be generated by a "vine.string()" validation but not at all times either.With "vine.number()", there is no error.
Changing some symbols to snake_case also seems to mute the problem ?!

Context :

  • typescript : 5.7.3
  • node : 22.10.0

Snippet :

the commented lines are the ones that generate the errors

export const MySchema = vine.object({  
   identifier: vine.number().positive().max(2147483647),  
   // numImmatriculationEF: vine.string(),  
   stf: vine.string().fixedLength(3),  
   // libelleStatut: enumStatutMR,  
   sync_statut: vine.enum(['F170', 'F079']).optional(), 
   id: vine.number().positive().max(2147483647).optional(),
})

Reproduction repo

No response

@thetutlage
Copy link
Contributor

Hello @sergefabre

A reproduction error will be needed to debug this issue 👍

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

2 participants