React, Vue, Angular, Express & more

Real-World Examples

See jsdoc-scribe detect your framework and generate real JSDoc — genuine CLI output captured from this repo's own sample fixtures, not hand-authored copy. New here? Start with the Quick Start guide.

React

Detected via "react" in package.json dependencies or via .tsx files present (fallback heuristic)

sample/react/Button.tsx

Next.js

Detected via "next" in package.json dependencies

sample/nextjs/app/api/users/route.ts

Angular

Detected via "@angular/core" in package.json dependencies

sample/angular/user.service.ts

Vue

Detected via "vue" in package.json dependencies or via .vue files present (fallback heuristic)

Full generated sample coming soon

Express

Detected via "express" in package.json dependencies

sample/express/routes/task.routes.ts

NestJS

Detected via "@nestjs/core" in package.json dependencies

sample/nestjs/auth/roles.guard.ts

Plain JS

No dependency or file-extension signal matched by getFrameworkSignals() for plain .js files (confirmed by running the real detector against a bare probe project) โ€” detected by process of elimination against the other six frameworks, not a positive signal.

sample/vanilla-js/validators.js

Plain TS

No dependency or file-extension signal matched by getFrameworkSignals() for plain .ts files (confirmed by running the real detector against a bare probe project) โ€” detected by process of elimination against the other six frameworks, not a positive signal.

sample/errors.ts

Before & After: Real Generated JSDoc

Captured from a real run of the CLI against jsdoc-scribe's own checked-in sample/nestjs/auth/roles.guard.ts fixture (NestJS) — genuine output, not hand-authored to look plausible. See the full CLI Usage guide for every flag shown here.

Before
import { CanActivate, ExecutionContext, Injectable, ForbiddenException } from "@nestjs/common";
import { UserRole } from "../users/entities/user.entity";

interface RequestWithRole {
    headers: Record<string, string | undefined>;
}

@Injectable()
export class RolesGuard implements CanActivate {
    canActivate(context: ExecutionContext): boolean {
        const request = context.switchToHttp().getRequest<RequestWithRole>();
        const role = request.headers["x-user-role"];
        if (role !== UserRole.Admin) {
            throw new ForbiddenException("This action requires the admin role");
        }
        return true;
    }
}
AFTER — gen-comments --write
import { CanActivate, ExecutionContext, Injectable, ForbiddenException } from "@nestjs/common";
import { UserRole } from "../users/entities/user.entity";

/**
 * @interface RequestWithRole
 * @property {Record<string, string | undefined>} headers
 */
interface RequestWithRole {
    headers: Record<string, string | undefined>;
}

/**
 * Represents a roles guard.
 * @implements CanActivate
 */
@Injectable()
export class RolesGuard implements CanActivate {
    /**
     * Returns whether the activate is permitted.
     * @param {ExecutionContext} context - execution context.
     * @returns {boolean}
     * @throws {ForbiddenException}
     */
    canActivate(context: ExecutionContext): boolean {
        /**
         * @constant request
         * @type {any}
         */
        const request = context.switchToHttp().getRequest<RequestWithRole>();
        /**
         * @constant role
         * @type {any}
         */
        const role = request.headers["x-user-role"];
        if (role !== UserRole.Admin) {
            throw new ForbiddenException("This action requires the admin role");
        }
        return true;
    }
}

What the Generated Docs Site Looks Like

A representative preview of the static reference site gen-docs builds from JSDoc like the above — illustrative markup, not a live embed.