Skip to content

Commit 65bc888

Browse files
committed
chore: update jsdocs
1 parent 064ae0d commit 65bc888

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ findRoute(router, "GET", "/");
9696

9797
Compiles the router instance into a faster route-matching function.
9898

99-
**IMPORTANT:** This function requires eval (`new Function`) support in the runtime environment for JIT (Just-In-Time) compilation.
99+
**IMPORTANT:** `compileRouter` requires eval support with `new Function()` in the runtime for JIT compilation.
100100

101101
**Example:**
102102

@@ -113,7 +113,7 @@ findRoute("GET", "/path/foo/bar");
113113

114114
Compile the router instance into a compact runnable code.
115115

116-
**IMPORTANT:** Route data must be serializable to JSON (i.e., no functions or classes) or implement the `toJSON` method to render custom code.
116+
**IMPORTANT:** Route data must be serializable to JSON (i.e., no functions or classes) or implement the `toJSON()` method to render custom code.
117117

118118
**Example:**
119119

src/compiler.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ import type { MatchedRoute, MethodData, Node, RouterContext } from "./types.ts";
33
/**
44
* Compiles the router instance into a faster route-matching function.
55
*
6-
*
7-
* **IMPORTANT:** This function requires eval (`new Function`) support in the runtime environment for JIT (Just-In-Time)
8-
* compilation.
6+
* **IMPORTANT:** `compileRouter` requires eval support with `new Function()` in the runtime for JIT compilation.
97
*
108
* @example
119
* import { createRouter, addRoute } from "rou3";
@@ -31,8 +29,7 @@ export function compileRouter<T>(
3129
/**
3230
* Compile the router instance into a compact runnable code.
3331
*
34-
* **IMPORTANT:** Route data must be serializable to JSON (i.e., no functions or classes) or implement the `toJSON` method to render custom code.
35-
*
32+
* **IMPORTANT:** Route data must be serializable to JSON (i.e., no functions or classes) or implement the `toJSON()` method to render custom code.
3633
*
3734
* @example
3835
* import { createRouter, addRoute } from "rou3";

0 commit comments

Comments
 (0)