amplitude / amplitude/Amplitude-TypeScript

Ampli DestinationPlugin doesn't support undefined return value

オープン
#308 コメント 9 件 リアクション 0 件 担当者 0 名 GitHub で見る
documentation
主要言語
TypeScript
スター
180
フォーク
68
平均マージ
3日 1時間
マージ済み PR(30日)
29

説明

Hello,

There's a discrepancy between the docs and the implementation of the Ampli Plugin.

I'm trying to write a plugin to forward data to other services and in some cases not to Amplitude, just like [this middleware from the docs](https://www.docs.developers.amplitude.com/data/ampli/middleware/#forward-data-to-other-services-but-not-amplitude).

## Expected Behavior
According to the [docs](https://www.docs.developers.amplitude.com/data/ampli/plugin/#forward-data-to-other-services-but-not-amplitude):
> if used as a destination type plugin, the expected return value is undefined

## Current Behavior

This is not the case in the code: https://github.com/amplitude/Amplitude-TypeScript/blob/main/packages/analytics-types/src/plugin.ts#L25

## Possible Solution

Update docs / change type to allow DestinationPlugins to return undefined

## Environment
- JS SDK Version: 1.6.7
- Installation Method: yarn
- Browser and Version: Brave v1.46.153

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。