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

Wrong error with default export <expression> as type #458

Open
nicolo-ribaudo opened this issue Apr 28, 2024 · 0 comments
Open

Wrong error with default export <expression> as type #458

nicolo-ribaudo opened this issue Apr 28, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@nicolo-ribaudo
Copy link

➜ deno publish --dry-run
Check file:///home/nic/Documents/dev/experiments.localhost/decimal-literal/src/index.ts
Checking for slow types in the public API...
error[unsupported-default-export-expr]: default export expression was too complex
  --> /home/nic/Documents/dev/experiments.localhost/decimal-literal/src/index.ts:71:1
   | 
71 | export default createDecimalTag<DecimalConstructor>(
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
72 |   undefined as never
   | ^^^^^^^^^^^^^^^^^^^^
73 | ) as DecimalTag<Decimal>;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^
   = hint: add an 'as' clause with an explicit type after the expression, or extract to a variable

  info: fast check was unable to infer the type of the default export expression
  docs: https://jsr.io/go/slow-type-unsupported-default-export-expr

The expression is already annotated with as, the error message should either not be there or tell me to do something different.

@lucacasonato lucacasonato added the bug Something isn't working label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Needs Plan
Development

No branches or pull requests

2 participants