Skip to content

Commit

Permalink
add type overloads
Browse files Browse the repository at this point in the history
  • Loading branch information
dcousens committed Aug 15, 2024
1 parent 074cac9 commit afc13a7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/core/src/lib/telemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ function inform () {
userConfig.set('telemetry', telemetry)
}

async function sendEvent (eventType: 'project', eventData: Project): Promise<void>
async function sendEvent (eventType: 'device', eventData: Device): Promise<void>
async function sendEvent (eventType: 'project' | 'device', eventData: Project | Device) {
const endpoint = process.env.KEYSTONE_TELEMETRY_ENDPOINT || defaultTelemetryEndpoint
const req = https.request(`${endpoint}/2/event/${eventType}`, {
Expand Down

0 comments on commit afc13a7

Please sign in to comment.