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

Add TypeScript Declaration File. #78

Merged
merged 1 commit into from
Jan 11, 2024
Merged

Conversation

zhzLuke96
Copy link

@zhzLuke96 zhzLuke96 commented Jan 10, 2024

Problem

Add TypeScript type definitions for the pdf2md library to improve integration with TypeScript projects.

Solution

Wrote a types/pdf2md.d.ts type definition file with declarations for the pdf2md interface.

Features:

  • Added a complete types/pdf2md.d.ts type definition file declaring the externally exposed interfaces of pdf2md

Improvements:

  • Define the function type of pdf2md() in types/pdf2md.d.ts to document details of the interfaces

Copy link

@LoneRifle LoneRifle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@LoneRifle LoneRifle merged commit ced6ca9 into opengovsg:master Jan 11, 2024
@inimeseke
Copy link

The TS definition file is not included in the NPM package at the moment.

I think that this change should be made in package.json

"files": [
"/lib",
"/test",
"/types"
],

@inimeseke
Copy link

inimeseke commented Mar 7, 2024

I would do it, but I don't know how to use Github properly

@zhzLuke96
Copy link
Author

The TS definition file is not included in the NPM package at the moment.

I think that this change should be made in package.json

"files": [ "/lib", "/test", "/types" ],

Oops, this my bad...
This change requires the package owner to repackage and republish, but before that, a new PR is needed to modify the package.json.
If @inimeseke you'd like to fix it, you can: fork it => fix it => submit a PR. Thank you.

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.

None yet

3 participants