Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add types to package.json and typedef for payload#25

Merged
winsmith merged 1 commit into
TelemetryDeck:mainTelemetryDeck/JavaScriptSDK:mainfrom
timidak:add-type-fixestimidak/JavaScriptSDK:add-type-fixesCopy head branch name to clipboard
Nov 28, 2023
Merged

Add types to package.json and typedef for payload#25
winsmith merged 1 commit into
TelemetryDeck:mainTelemetryDeck/JavaScriptSDK:mainfrom
timidak:add-type-fixestimidak/JavaScriptSDK:add-type-fixesCopy head branch name to clipboard

Conversation

@timidak

@timidak timidak commented Nov 28, 2023

Copy link
Copy Markdown
Contributor

Problem

I had two problems when integrating the SDK into telemetrydeck-react. First, the d.ts file wasn't recognized by typescript, so I added the file manually to the types field of the package.json. After doing so, I noticed that the TelemetryDeckPayload type was missing.

What I did

I basically added the types field to your package.json referencing the telemetrydeck.d.ts that is generated and added a very basic typedef of the TelemetryDeckPayload type.
I also ran the prepublish command to test that my work was correct and saw the right payload type exported from the d.ts file.

export type TelemetryDeckPayload = {
    [x: string]: any;
};

@winsmith winsmith self-requested a review November 28, 2023 18:33
@winsmith winsmith merged commit ee93f38 into TelemetryDeck:main Nov 28, 2023
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.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.