API Reference

Complete TypeScript API Documentation

Comprehensive reference for all MoroJS types, functions, classes, and interfaces. Generated directly from TypeScript source code with full type information.

1461
Total API Elements

Quick Access

API Categories

API Usage Example

Type-Safe API Development

Using the API

typescript

1import { 
2  createApp,        // Function
3  Moro,            // Class  
4  RouteBuilder,    // Interface
5  HttpMethod,      // Type Alias
6  providers        // Variable
7} from '@morojs/moro';
8
9// Create application with full type safety
10const app: Moro = createApp({
11  cors: true,
12  compression: true
13});
14
15// Chainable route building with RouteBuilder
16app.post('/users')
17  .body(UserSchema)
18  .auth({ roles: ['admin'] })
19  .handler(({ body }) => {
20    // body is fully typed
21    return { success: true, user: body };
22  });

Runtime Adapters

Multi-runtime support

typescript

1// Different creation functions for different runtimes
2import { 
3  createApp,        // Node.js
4  createAppEdge,    // Vercel Edge
5  createAppLambda,  // AWS Lambda
6  createAppWorker   // Cloudflare Workers
7} from '@morojs/moro';
8
9// All return the same Moro interface
10const nodeApp: Moro = createApp();
11const edgeApp: Moro = createAppEdge();
12const lambdaApp: Moro = createAppLambda();
13const workerApp: Moro = createAppWorker();
14
15// Same API, different runtime optimizations

Complete Documentation

This API reference is generated directly from TypeScript source code. For the complete TSDoc documentation, visit our GitHub repository.