amplitude / amplitude/Amplitude-TypeScript

[Unified SDK] TypeError: Identify is not a constructor

未關閉
#1,124 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
bug
主要語言
TypeScript
星號
180
分支
68
平均合併
3 天 1 小時
30 天內合併 PR
29

描述

#
## Expected Behavior

`Identify` class should be available for _identify_ event

## Current Behavior

when I use `new Identify().set`, as the documentation suggests, I'm getting an error that the class isn't a constructor. as a workaround, I imported `Identify` from `'amplitude/analytics-core'`, but I guess this is not the correct way

## Possible Solution

inside index.d.ts file, export the mentioned class (like in index.d.ts from analytics-browser)

## Steps to Reproduce

1.

![Image](https://github.com/user-attachments/assets/1b335491-f092-4e2e-a850-2c4d13b8635e)

2.

![Image](https://github.com/user-attachments/assets/9391c3d8-3df2-4763-b050-4ad90993b1ee)

3.
![Image](https://github.com/user-attachments/assets/90f8f30c-28e9-449e-84e5-466032a911e7)

## Environment
- JS SDK Version: 1.0.0-beta.2
- Installation Method: npm
- Browser and Version: Chrome 137

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。