Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@snowplow/browser-tracker",
"comment": "Fix newTracker typing for better understanding of arguments",
"type": "none"
}
],
"packageName": "@snowplow/browser-tracker"
}
2 changes: 1 addition & 1 deletion trackers/browser-tracker/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const state = typeof window !== 'undefined' ? createSharedState() : undefined;
* @param endpoint - Collector endpoint in the form collector.mysite.com
* @param configuration - The initialisation options of the tracker
*/
export function newTracker(trackerId: string, endpoint: string, configuration: TrackerConfiguration = {}) {
export function newTracker(trackerId: string, endpoint: string, configuration?: TrackerConfiguration) {
if (state) {
return addTracker(trackerId, trackerId, `js-${version}`, endpoint, state, configuration);
} else {
Expand Down