From 0105668a626419138e3696f061c403fdfaf49ff0 Mon Sep 17 00:00:00 2001 From: Bhargavi-BS Date: Thu, 16 Jul 2026 17:59:42 +0530 Subject: [PATCH 1/2] fix: declare browser.setCustomTags on WebdriverIO.Browser type (SDK-6882) Port of harshit-browserstack/webdriverio#5 to the standalone repo. The command works at runtime but TypeScript consumers hit TS2339 because the declaration lives only in src/@types/bstack-service-types.d.ts, which is never emitted into the shipped build/index.d.ts. Adding it to the declare global block in src/index.ts ships the augmentation to consumers. No runtime change. Co-Authored-By: Claude Fable 5 --- .changeset/fix-sdk-6882-setcustomtags-type.md | 5 +++++ packages/browserstack-service/src/index.ts | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changeset/fix-sdk-6882-setcustomtags-type.md diff --git a/.changeset/fix-sdk-6882-setcustomtags-type.md b/.changeset/fix-sdk-6882-setcustomtags-type.md new file mode 100644 index 0000000..d8b9085 --- /dev/null +++ b/.changeset/fix-sdk-6882-setcustomtags-type.md @@ -0,0 +1,5 @@ +--- +"@wdio/browserstack-service": patch +--- + +Declare `browser.setCustomTags(key, value)` on the global `WebdriverIO.Browser` interface so TypeScript consumers can call it without a `TS2339` compile error. The command already worked at runtime; the declaration previously lived only in `src/@types/bstack-service-types.d.ts`, which is never emitted into the shipped `build/index.d.ts`. No runtime change. diff --git a/packages/browserstack-service/src/index.ts b/packages/browserstack-service/src/index.ts index 1c9ca3e..8d9d50f 100644 --- a/packages/browserstack-service/src/index.ts +++ b/packages/browserstack-service/src/index.ts @@ -26,7 +26,8 @@ declare global { getAccessibilityResults: () => Promise>>, performScan: () => Promise | undefined>, startA11yScanning: () => Promise, - stopA11yScanning: () => Promise + stopA11yScanning: () => Promise, + setCustomTags: (key: string, value: string) => Promise } } interface State { From 0f9d1f0cb987f66094789aa67c61ba24c7a24a79 Mon Sep 17 00:00:00 2001 From: Bhargavi-BS Date: Thu, 16 Jul 2026 18:33:10 +0530 Subject: [PATCH 2/2] chore: remove changeset file (review feedback) Co-Authored-By: Claude Fable 5 --- .changeset/fix-sdk-6882-setcustomtags-type.md | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 .changeset/fix-sdk-6882-setcustomtags-type.md diff --git a/.changeset/fix-sdk-6882-setcustomtags-type.md b/.changeset/fix-sdk-6882-setcustomtags-type.md deleted file mode 100644 index d8b9085..0000000 --- a/.changeset/fix-sdk-6882-setcustomtags-type.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wdio/browserstack-service": patch ---- - -Declare `browser.setCustomTags(key, value)` on the global `WebdriverIO.Browser` interface so TypeScript consumers can call it without a `TS2339` compile error. The command already worked at runtime; the declaration previously lived only in `src/@types/bstack-service-types.d.ts`, which is never emitted into the shipped `build/index.d.ts`. No runtime change.