Skip to content

Commit

Permalink
add module docs
Browse files Browse the repository at this point in the history
  • Loading branch information
korkje committed Jun 3, 2024
1 parent f98d985 commit 2b9cc1a
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/context.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* @module
* Exports the {@link Context} class.
*/

import { ServerError, type ServerErrorParams } from "lib/error.ts";
import type Params from "lib/params.ts";

Expand Down
5 changes: 5 additions & 0 deletions lib/error.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* @module
* Exports error-related classes and functions.
*/

/**
* ServerError parameters.
*/
Expand Down
5 changes: 5 additions & 0 deletions lib/params.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* @module
* Exports the {@link Params} helper type.
*/

type Delim = "!" | "\"" | "#" /*| "$" */| "%" | "&" | "'" | "(" | ")" | "*" | "+" | "," | "-" | "." | "/" | ":" | ";" | "<" | "=" | ">" | "?" | "@" | "[" | "\\" | "]" | "^" /*| "_" */| "`" | "{" | "|" | "}" | "~";

type Add<List extends unknown[], Item = unknown> = [...List, Item];
Expand Down
5 changes: 5 additions & 0 deletions lib/router.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* @module
* Exports the {@link Router} class and related types.
*/

import Context from "lib/context.ts";
import { ServerError } from "lib/error.ts";

Expand Down
8 changes: 8 additions & 0 deletions middleware/cors.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
/**
* @module
* Exports the {@link cors} middleware.
*/

import type Context from "lib/context.ts";
import type { Middleware } from "lib/router.ts";

/**
* Indicates that the value should be echoed.
*/
export const echo = Symbol("echo");
type Echo = typeof echo;

Expand Down
5 changes: 5 additions & 0 deletions mod.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* @module
* Exports the core components of the framework.
*/

export { default, Router } from "lib/router.ts";
export { error } from "lib/error.ts";
export { cors } from "middleware/cors.ts";

0 comments on commit 2b9cc1a

Please sign in to comment.