This is a tool to generate TypeScript Types for all objects and request arguments from your site's WordPress REST API. As each WordPress site can have it's own set of endpoints and object types (provided by plugins and custom API endpoints), it's often neccesary to have the types specific to the site's API rather than a generic set of WordPress types.
The generator works by crawling your WordPress site's REST API base and inspecting all
schema properties of all endpoints. Enter your WordPress site URL below to generate types.
Currently this supports creating TypeScript types for all object types (such as
page, etc), and object base route request arguments, such as
Object types are transformed from snake-case to pascal case, for example
Object base route request arguments are similarily converted. The endpoint
GET /wp/v2/posts will generate a type
POST /wp/v2/pages will generate a TypeScript type of
In the future I'd like to release this as a package so developers can run it locally too.