Skip to content

Bug with declarations exports #75

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

Closed
vankop opened this issue Nov 8, 2019 · 8 comments
Closed

Bug with declarations exports #75

vankop opened this issue Nov 8, 2019 · 8 comments

Comments

@vankop
Copy link
Member

vankop commented Nov 8, 2019

  • Node Version: 10
  • schema-utils Version: master

Expected Behavior / Situation

expect correct export

Actual Behavior / Situation

Incorrect
Снимок экрана 2019-11-08 в 16 54 39

Modification Proposal

export default function validate() instead of function validate(); export default validate

Снимок экрана 2019-11-08 в 16 56 23

@vankop
Copy link
Member Author

vankop commented Nov 8, 2019

/cc @ematipico @sokra it could be problem of commonjs exports also

@vankop
Copy link
Member Author

vankop commented Nov 8, 2019

Strange thing is ValidationError does not have export in this file at all =(

@alexander-akait
Copy link
Member

I tested latest PRs with types with webpack and all was fine, strange

@vankop
Copy link
Member Author

vankop commented Nov 8, 2019

Maybe TS when imports files skip errors in namespaces.. As you can see _default is undefined + as I said ValidationError does not have export here https://github.com/webpack/schema-utils/pull/76/files#diff-854a1405659189385e9df4108aea99b0R26

@alexander-akait
Copy link
Member

Maybe ts error?

@vankop
Copy link
Member Author

vankop commented Nov 8, 2019

🤷‍♂️
npm run build:types return 0 as a result

@alexander-akait
Copy link
Member

Thanks for create issue in ts repo

@alexander-akait
Copy link
Member

Fixed #84

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