Skip to main content

Type generation

How protocol specs become TypeScript types, typings tests, and API docs. Agents: do not hand-edit generated files — change the source in this chart and regenerate.

What to edit​

You want to changeEdit thisThen run
A WebDriver / Appium / vendor command shapepackages/wdio-protocols/src/protocols/*.tspnpm run compile:all and pnpm run test:typings:webdriver
A user-facing browser.* / $().* commandpackages/webdriverio/src/commands/** plus its unit test and typings snippetpnpm run test:package webdriverio and pnpm run test:typings:webdriverio
BiDi typesinfra/bidiCodegen/pnpm run generate:bidi
Command API docs textJSDoc on the webdriverio commandpnpm run docs:generate
Protocol API docs textthe protocol spec description / refpnpm run docs:generate

See also High level overview. Protocol specs are owned by packages/wdio-protocols; the compiler plugin lives in infra/compiler/src/type-generation.

Welcome! How can I help?

WebdriverIO AI Copilot