{"id":16271,"library":"wdio-api-declaration","title":"WebdriverIO API Declaration","description":"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.","status":"abandoned","version":"0.0.3","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/monolithed/wdio-api-declaration","tags":["javascript","WebdriverIO","WebDriver","wdio","API","declaration"],"install":[{"cmd":"npm install wdio-api-declaration","lang":"bash","label":"npm"},{"cmd":"yarn add wdio-api-declaration","lang":"bash","label":"yarn"},{"cmd":"pnpm add wdio-api-declaration","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This package is a type declaration *only* and does not export any runtime symbols for direct import. Its purpose was solely for IDE tooling. Attempting to import from `wdio-api-declaration` directly will result in runtime errors as it's an empty declaration package.","symbol":"WebDriver","correct":"// This package does not export runtime symbols.\n// For WebdriverIO types, use `@types/webdriverio` or rely on WebdriverIO's built-in types.\n// import type { WebDriver } from 'webdriverio';"}],"quickstart":{"code":"npm install wdio-api-declaration\n\n// NOTE: This package is obsolete and its usage is not recommended for modern WebdriverIO projects.\n// Its original purpose was to provide IDE auto-completion by configuring it as an\n// 'External JavaScript library' in IDEs like WebStorm, without requiring code import.\n//\n// For current WebdriverIO projects (v7+), types are typically inferred automatically\n// or provided by `@types/webdriverio` and `@wdio/globals`.\n//\n// Example of how you would *actually* use WebdriverIO (with modern types):\n// import { remote } from 'webdriverio';\n//\n// async function runTest() {\n//   const browser = await remote({\n//     capabilities: {\n//       browserName: 'chrome'\n//     }\n//   });\n//\n//   await browser.url('https://webdriver.io');\n//   const title = await browser.getTitle();\n//   console.log(`Page title: ${title}`);\n//\n//   await browser.deleteSession();\n// }\n//\n// runTest().catch(console.error);","lang":"typescript","description":"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."},"warnings":[{"fix":"Do not use `wdio-api-declaration`. For modern WebdriverIO projects, rely on WebdriverIO's built-in TypeScript support and its `tsconfig.json` configuration, or install `@types/webdriverio` if explicit type declarations are required for specific tooling.","message":"This package (`wdio-api-declaration@0.0.3`) is severely outdated and no longer maintained. It targets extremely old Node.js versions (>=0.6.0) and an ancient WebdriverIO API.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Remove `wdio-api-declaration` from your project's `package.json` and `node_modules`. Ensure your `tsconfig.json` is correctly configured for WebdriverIO (e.g., including `@wdio/globals/types` in `types` array) or use `@types/webdriverio` for external type declarations.","message":"Using this package will lead to incorrect or missing type definitions for any recent version of WebdriverIO (v5 and above). The API declarations provided are completely out of sync with current WebdriverIO interfaces and commands.","severity":"breaking","affected_versions":">=0.0.1"},{"fix":"Migrate any legacy IDE configurations that relied on this package. Modern IDEs and development workflows automatically pick up types from `node_modules/@types` or the installed WebdriverIO packages.","message":"The functionality this package aimed to provide is now natively supported and significantly improved within WebdriverIO itself, or via standard `@types` packages for TypeScript.","severity":"deprecated","affected_versions":">=0.0.1"}],"env_vars":null,"last_verified":"2026-04-21T00:00:00.000Z","next_check":"2026-07-20T00:00:00.000Z","problems":[{"fix":"Ensure `wdio-api-declaration` is NOT installed. Check your `tsconfig.json` and ensure it includes `types: ['node', '@wdio/globals/types']` or similar, depending on your WebdriverIO version and setup. Run `npx wdio ts-setup` for automatic `tsconfig.json` configuration if available.","cause":"Incorrect or missing WebdriverIO type configurations, potentially due to using outdated declarations like `wdio-api-declaration` or not setting up `tsconfig.json` correctly.","error":"Cannot find name 'browser' or 'driver' or 'element' when using WebdriverIO with TypeScript."},{"fix":"Remove `wdio-api-declaration`. Upgrade your WebdriverIO setup if necessary and ensure you are using the correct type definitions that ship with WebdriverIO or `@types/webdriverio`. Check your `package.json` for relevant `@wdio` packages and their versions.","cause":"Using an outdated or incompatible type declaration for the WebdriverIO `browser` object. `wdio-api-declaration` provides extremely old definitions.","error":"Property 'url' does not exist on type 'Browser'."}],"ecosystem":"npm"}