Selaa lähdekoodia

Adds more typings

main
Eric Amodio 1 vuosi sitten
vanhempi
commit
c65b6fded3
2 muutettua tiedostoa jossa 22 lisäystä ja 3 poistoa
  1. +18
    -0
      src/constants.ts
  2. +4
    -3
      src/telemetry/telemetry.ts

+ 18
- 0
src/constants.ts Näytä tiedosto

@ -470,3 +470,21 @@ export const enum Schemes {
VslsScc = 'vsls-scc',
Virtual = 'vscode-vfs',
}
export type TelemetryEvents =
| 'account/validation/failed'
| 'activate'
| 'command'
| 'command/core'
| 'remoteProviders/connected'
| 'remoteProviders/disconnected'
| 'providers/changed'
| 'providers/context'
| 'providers/registrationComplete'
| 'repositories/changed'
| 'repositories/visibility'
| 'repository/opened'
| 'repository/visibility'
| 'subscription'
| 'subscription/changed'
| 'usage/track';

+ 4
- 3
src/telemetry/telemetry.ts Näytä tiedosto

@ -3,6 +3,7 @@ import type { Disposable } from 'vscode';
import { version as codeVersion, env } from 'vscode';
import { getProxyAgent } from '@env/fetch';
import { getPlatform } from '@env/platform';
import type { TelemetryEvents } from '../constants';
import type { Container } from '../container';
import { configuration } from '../system/configuration';
@ -30,7 +31,7 @@ export interface TelemetryProvider extends Disposable {
interface QueuedEvent {
type: 'sendEvent';
name: string;
name: TelemetryEvents;
data?: Record<string, AttributeValue | null | undefined>;
global: Map<string, AttributeValue>;
startTime: TimeInput;
@ -129,7 +130,7 @@ export class TelemetryService implements Disposable {
}
sendEvent(
name: string,
name: TelemetryEvents,
data?: Record<string, AttributeValue | null | undefined>,
startTime?: TimeInput,
endTime?: TimeInput,
@ -152,7 +153,7 @@ export class TelemetryService implements Disposable {
}
startEvent(
name: string,
name: TelemetryEvents,
data?: Record<string, AttributeValue | null | undefined>,
startTime?: TimeInput,
): Disposable | undefined {

Ladataan…
Peruuta
Tallenna