Sfoglia il codice sorgente

Adds more typings

main
Eric Amodio 1 anno fa
parent
commit
c65b6fded3
2 ha cambiato i file con 22 aggiunte e 3 eliminazioni
  1. +18
    -0
      src/constants.ts
  2. +4
    -3
      src/telemetry/telemetry.ts

+ 18
- 0
src/constants.ts Vedi File

@ -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 Vedi File

@ -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 {

Caricamento…
Annulla
Salva