diff --git a/experimental/packages/sdk-logs/test/browser/export/BatchLogRecordProcessor.test.ts b/experimental/packages/sdk-logs/test/browser/export/BatchLogRecordProcessor.test.ts index e176f3e7dd..7bef5aeb25 100644 --- a/experimental/packages/sdk-logs/test/browser/export/BatchLogRecordProcessor.test.ts +++ b/experimental/packages/sdk-logs/test/browser/export/BatchLogRecordProcessor.test.ts @@ -24,8 +24,14 @@ import { InMemoryLogRecordExporter } from './../../../src/export/InMemoryLogReco const describeDocument = typeof document === 'object' ? describe : describe.skip; +/** + * VisibilityState has been removed from TypeScript 4.6.0+ + */ +type WebVisibilityState = 'visible' | 'hidden'; + describeDocument('BatchLogRecordProcessor - web main context', () => { - let visibilityState: VisibilityState = 'visible'; + // TODO: change to DocumentVisibilityState when TypeScript is upgraded to 4.6+ + let visibilityState: WebVisibilityState = 'visible'; let exporter: LogRecordExporter; let processor: BatchLogRecordProcessor; let forceFlushSpy: sinon.SinonStub; diff --git a/packages/opentelemetry-sdk-trace-base/test/browser/export/BatchSpanProcessor.test.ts b/packages/opentelemetry-sdk-trace-base/test/browser/export/BatchSpanProcessor.test.ts index f510d518ff..901dd74ebf 100644 --- a/packages/opentelemetry-sdk-trace-base/test/browser/export/BatchSpanProcessor.test.ts +++ b/packages/opentelemetry-sdk-trace-base/test/browser/export/BatchSpanProcessor.test.ts @@ -30,6 +30,7 @@ const describeDocument = typeof document === 'object' ? describe : describe.skip; describeDocument('BatchSpanProcessor - web main context', () => { + // TODO: change to DocumentVisibilityState when TypeScript is upgraded to 4.6+ let visibilityState: WebVisibilityState = 'visible'; let exporter: SpanExporter; let processor: BatchSpanProcessor;