Skip to content

Commit ef30469

Browse files
Fix TelemetryReporter import to use named export in session.ts
`@vscode/extension-telemetry` exports `TelemetryReporter` as a named class with no default export. We were importing it as a default, which resolves to the module namespace object rather than the class, so using it as the `telemetryReporter` parameter type tripped `tsc --noEmit` with `error TS2709: Cannot use namespace 'TelemetryReporter' as a type`. `npm run compile` uses esbuild, which doesn't type-check, so this slipped through CI. This aligns `session.ts` with the named import already used in `extension.ts`. The symbol is only used as a type here, so there's no runtime change. Drafted by Copilot (Claude Opus 4.8). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 0e0d21e commit ef30469

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/session.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
import net = require("net");
55
import path = require("path");
66
import vscode = require("vscode");
7-
import TelemetryReporter, {
7+
import {
88
type TelemetryEventMeasurements,
99
type TelemetryEventProperties,
10+
TelemetryReporter,
1011
} from "@vscode/extension-telemetry";
1112
import { Message } from "vscode-jsonrpc";
1213
import {

0 commit comments

Comments
 (0)