WebdriverIO API Declaration

0.0.3 · abandoned · verified Tue Apr 21

The `wdio-api-declaration` package was designed to provide API declarations for WebdriverIO, primarily to enable code editor auto-completion, particularly in IDEs like WebStorm. Released at an early version (0.0.3), it targeted very old Node.js environments (version >=0.6.0) and its usage model relied on specific 'External JavaScript library' configurations within IDEs. This package is now considered obsolete, superseded by WebdriverIO's robust native TypeScript support (introduced and significantly enhanced from WebdriverIO v5 onwards) and the officially maintained `@types/webdriverio` package. It has not received updates for many years and offers no functional value for modern WebdriverIO development. Developers should rely on WebdriverIO's built-in type definitions or the `@types` package for contemporary type inference.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates the installation of the `wdio-api-declaration` package and explains its original, now obsolete, purpose for IDE auto-completion without direct code usage. It also provides context on how modern WebdriverIO handles types.

npm install wdio-api-declaration

// NOTE: This package is obsolete and its usage is not recommended for modern WebdriverIO projects.
// Its original purpose was to provide IDE auto-completion by configuring it as an
// 'External JavaScript library' in IDEs like WebStorm, without requiring code import.
//
// For current WebdriverIO projects (v7+), types are typically inferred automatically
// or provided by `@types/webdriverio` and `@wdio/globals`.
//
// Example of how you would *actually* use WebdriverIO (with modern types):
// import { remote } from 'webdriverio';
//
// async function runTest() {
//   const browser = await remote({
//     capabilities: {
//       browserName: 'chrome'
//     }
//   });
//
//   await browser.url('https://webdriver.io');
//   const title = await browser.getTitle();
//   console.log(`Page title: ${title}`);
//
//   await browser.deleteSession();
// }
//
// runTest().catch(console.error);

view raw JSON →