This repository was archived by the owner on Apr 3, 2024. It is now read-only.
Fix #55: missing TypeScript declarations in packaged output#111
Merged
pooyaj merged 1 commit intosegmentio:masterfrom Nov 10, 2020
Merged
Fix #55: missing TypeScript declarations in packaged output#111pooyaj merged 1 commit intosegmentio:masterfrom
pooyaj merged 1 commit intosegmentio:masterfrom
Conversation
c3b84ea to
e3de1f8
Compare
Contributor
Author
|
Could you look into this? It's very annoying when using the library in a TypeScript project... |
Contributor
|
@frankie567 Thanks for the PR! Merged and published a new version ( 5.0.2 ) |
Contributor
|
I'm still experiencing this issue on version 5.1.0 |
kilinkis
added a commit
to kilinkis/consent-manager
that referenced
this pull request
Nov 20, 2020
There is no `src` directory under the `types` directory, so the declarations were failing. This PR points to the correct file. Related to [segmentio#111](segmentio#111). kudos to my colleague @mrseanbaines who noticed the path was wrong.
|
The bug fix by @kilinkis is great! Until that is released I found this work around worked for me: file: declare module "@segment/consent-manager" {
export * from "@segment/consent-manager/types/index";
} |
|
The issue seems now to be (in version 5.2.0) that the package.json is pointing in the wrong place for the declaration file. Changing line 15 from |
nd4p90x
added a commit
that referenced
this pull request
Sep 9, 2021
There is no `src` directory under the `types` directory, so the declarations were failing. This PR points to the correct file. Related to [#111](#111). kudos to my colleague @mrseanbaines who noticed the path was wrong. Co-authored-by: Shane L. Duvall <shane@northtwofive.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi there!
When installing this library in a TypeScript project, the compiler complains that declarations are missing ; while this library is written in TS (see #55).
This PR should address this issue by generating
.d.tsfiles in dist and correctly declare it inpackages.json.Cheers!