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

Modifier types are not exported #47

Closed
adamcikado opened this issue Apr 29, 2024 · 0 comments · Fixed by #48
Closed

Modifier types are not exported #47

adamcikado opened this issue Apr 29, 2024 · 0 comments · Fixed by #48

Comments

@adamcikado
Copy link
Contributor

adamcikado commented Apr 29, 2024

Package version

2.0.0

Describe the bug

When you try to export package that is using VineJS, you will get error because it cannot reference to modifier types like OptionalModifier.

Example

import { VineString } from '@vinejs/vine';

export function optional(input: VineString) {
  return input.optional();
}

Error

The inferred type of 'optional' cannot be named without a reference to '../../node_modules/@vinejs/vine/build/src/schema/base/literal.js'. This is likely not portable. A type annotation is necessary.ts(2742)

Reproduction repo

See error over optional function or try building the declaration files using npm run build:dts.

https://stackblitz.com/edit/stackblitz-starters-zoy77c

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

Successfully merging a pull request may close this issue.

1 participant