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 definitions #55

Merged
merged 3 commits into from
Jun 30, 2021
Merged

Conversation

JackCuthbert
Copy link
Contributor

Description

We'd like to use this library in a Next.js application that we're building with TypeScript but it complains that there is no type declarations for the module. This PR adds a TypeScript declaration for the @segment/snippet module.

I've also documented the ajsPath option from #50 merged in 7119bcc.

Preview

Editor/tsserver integration working

image

image

Testing

I've verified that this works with npm link in our TypeScript project locally. There are no functionality changes so I expect this would work when published as long as the types.d.ts file is included in the package.

@tomevans18
Copy link

I can confirm this resolves the issue.
There is a problem with the CI tooling though that has blocked this PR.

@maccman
Copy link

maccman commented Feb 21, 2021

Please merge

@FDiskas
Copy link

FDiskas commented May 31, 2021

what is the blocker to merge this?

@codecov-commenter
Copy link

Codecov Report

Merging #55 (0917032) into master (f8142ff) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #55   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           33        33           
  Branches        11        11           
=========================================
  Hits            33        33           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f8142ff...0917032. Read the comment docs.

@juliofarah juliofarah self-requested a review June 30, 2021 16:59
Copy link
Contributor

@juliofarah juliofarah left a comment

Choose a reason for hiding this comment

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

Thanks @JackCuthbert for your contribution and I'm sorry we took so long to review this pull request.

I'm merging this and creating a new version right now!

@juliofarah juliofarah merged commit 0c5c5b2 into segmentio:master Jun 30, 2021
@juliofarah juliofarah mentioned this pull request Jun 30, 2021
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.

6 participants