DestinationMiddlewareFunction type is missing from export
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 58/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- api
Research direction
Start at packages/browser/src/plugins/middleware/index.ts, where DestinationMiddlewareFunction is defined, and compare its export path with MiddlewareFunction. Verify that a type-only import from @segment/analytics-next resolves successfully; done means consumers can import DestinationMiddlewareFunction from the package without using an internal path.
Written by the indexing model from the issue text.
Description
I'm currently trying to create a Destination Middleware Function outlined in this guide:
https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/middleware/
The current @segment/analytics-next library supports importing the general MiddlewareFunction type but does not support DestinationMiddlewareFunction.
Here's how I want to use the type:
import type { DestinationMiddlewareFunction } from '@segment/analytics-next';
export function destinationMiddlewareFactory(): DestinationMiddlewareFunction {
return function destinationMiddlware({payload, integration, next}) {
...
next(payload)
}
}
I'm currently using "@segment/analytics-next": "^1.53.3".
Here is the type in the sourcecode:
https://github.com/segmentio/analytics-next/blob/9ba0dc6fc1fb237bbed72da458d0c4ea80d52cd8/packages/browser/src/plugins/middleware/index.ts#L23
- Dominant language
- TypeScript
- Stars
- 477
- Forks
- 160
- Avg merge
- 6h 19m
- Merged PRs (30d)
- 4
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from segmentio/analytics-next
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
segmentio/analytics-next#1324 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
segmentio/analytics-next#1366 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
segmentio/analytics-next#1338 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
segmentio/analytics-next#1337 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
segmentio/analytics-next#1332 ·
All issues in segmentio/analytics-next
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·