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

Render inter-compatible type-definition files #291

Closed
candrews opened this issue Oct 23, 2022 · 5 comments · Fixed by #292
Closed

Render inter-compatible type-definition files #291

candrews opened this issue Oct 23, 2022 · 5 comments · Fixed by #292
Assignees
Labels
enhancement New feature or request

Comments

@candrews
Copy link
Contributor

If this library published inter-compatible type-definitions, it would facilitate the use of the library by projects that use other versions of typescript.

For example, see snyk/cli#3983 (comment)

Thank you!

@jkowalleck jkowalleck pinned this issue Oct 23, 2022
@jkowalleck jkowalleck self-assigned this Oct 23, 2022
@jkowalleck
Copy link
Member

jkowalleck commented Oct 23, 2022

damned, i got away with my crappy abuse of the source-files for too long ;-)

will see what i can do.

goal: be able to use this library (that is written in TypoScript4) in a project that uses typescript 3.x for compiling.

@jkowalleck
Copy link
Member

to give some context: there is nothing wrong with the current method of announcing the type declarations based on the actual source code.
the actual source code targets TypeScript v4.8

if downstream users of the library compile with a typescript version that does not fully understand all features that are used, or has a different config regarding the compatibility-settings, then that downstream compiler crashes.

to mitigate these crashes, it is desired to render and announce type declarations that are not inter-compatible to most popular versions of typescript (v3.X, v4.X)
so that the user base is not restricted in their usage of typescript.

@jkowalleck
Copy link
Member

@candrews could you bump your dependency to this lib to ^1.7.0 and see if yoi can digest the new type declarations that are now shipped?

@candrews
Copy link
Contributor Author

could you bump your dependency to this lib to ^1.7.0 and see if yoi can digest the new type declarations that are now shipped?

Done! That was easy. The diff for the PR at snyk/cli#3983 is now much smaller. Thank you!

@jkowalleck
Copy link
Member

no worries. thanks for pushing this feature forward.
i just needed a good reason to generate these declaration files.

@jkowalleck jkowalleck unpinned this issue Nov 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants