A worked example, rendered from real sample data. Sign in to run the tool on your own input.
function getUserById(id: string) { return user; }
class UserService { constructor() {} }
const API_URL = 'https://api.example.com';{
"title": "Generated Documentation",
"sections": [
{
"heading": "Overview",
"content": "This documentation was auto-generated from code comments and function signatures."
},
{
"heading": "Functions & Classes",
"items": [
{
"name": "Item 1",
"signature": "function getUserById(id: string) { return user; }",
"description": "Function or class extracted from source code",
"parameters": [],
"returns": "void | unknown"
},
{
"name": "Item 2",
"signature": "class UserService { constructor() {} }",
"description": "Function or class extracted from source code",
"parameters": [],
"returns": "void | unknown"
},
{
"name": "Item 3",
"signature": "const API_URL = 'https://api.example.com';",
"description": "Function or class extracted from source code",
"parameters": [],
"returns": "void | unknown"
}
]
},
{
"heading": "Quick Start",
"content": "1. Import the module\n2. Initialize the component\n3. Call the methods as needed"
}
],
"generatedAt": "2026-09-20T12:07:29.085Z"
}
Generate documentation from code comments and function signatures with formatted output. Part of the DevTools Surf developer suite. Browse more tools in the API / Config collection.