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

[WIP] Add TypeScript declaration files to output #204

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

EdricChan03
Copy link
Contributor

@EdricChan03 EdricChan03 commented Mar 28, 2021

This PR introduces declaration files to the output. The changes include:

  1. Adding a TSConfig override in the Bili config to allow for declaration files to be generated and are then generated in ./dist/types.
  2. Adding the necessary JSON properties to package.json such that the TS compiler can detect the declaration files (as indicated in the TypeScript docs for publishing declaration files).

Caveats

The typings currently don't include the community notations.

Additional notes

  • Could the notations be potentially used on their own in the future?
  • I've fixed an issue in src/community/infix-abstract.ts which broke the build
  • Here's a preview of what the output would be:

Screenshot of the output directory

Closes #150

@dan-simon
Copy link
Collaborator

Is this PR also mergeable?

@EdricChan03
Copy link
Contributor Author

EdricChan03 commented Apr 4, 2021

Is this PR also mergeable?

I've not (yet) tested if the typings are actually usable. Additionally, community notation typings are also generated but won't work if the community notations aren't actually imported so this may require a general restructure of how community notations would be consumed

@EdricChan03 EdricChan03 force-pushed the export-typescript-declaration-files branch 2 times, most recently from a6e983d to f653546 Compare April 6, 2021 12:45
@EdricChan03 EdricChan03 force-pushed the export-typescript-declaration-files branch from f653546 to a39e762 Compare July 17, 2023 04:44
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 this pull request may close these issues.

Feature Request: Declaration File
2 participants