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

Syntax error with TypeScript < 3.8 on re-exporting types #36

Open
caspervg opened this issue Jun 8, 2022 · 0 comments
Open

Syntax error with TypeScript < 3.8 on re-exporting types #36

caspervg opened this issue Jun 8, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@caspervg
Copy link

caspervg commented Jun 8, 2022

Versions

  • 0.3.8

Describe the bug

As previously explained in the (failed) PR #33, the package currently uses the syntax export type { TypeName } from './lib/module'; to re-export PlausibleOptions and EventOptions. That syntax has only been supported since TypeScript 3.8 (see the changelog here). Admittedly, that is a version from February 2020, so it has been supported already for awhile. In older versions, the following syntax error occurs on build when attempting to use the library:

image

Expected behavior

Unfortunately we are stuck in TypeScript 3.4 with no easy upgrade path, and it would be nice if some older versions of TypeScript could be supported.

Steps to reproduce

Steps:

  1. Install normally in an environment with TS 3.4 (or any other TS < 3.8)
  2. Set it up
  3. Try to use it

Your Environment

  • Device: Desktop PC
  • OS: Ubuntu 22.04
  • TypeScript version 3.4

Additional context

I am currently preparing a new PR that fixes this issue for TS 3.4 and up (and older versions also) and will continue to work for newer versions also, without breaking the build/tests

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
None yet
Development

No branches or pull requests

1 participant