feat(examples): worked example for typed api blocks
- Add examples/basic-app/app/api/directory.ts and app/pages/api-block-demo.wrn as the end-to-end worked example for typed api blocks (Task 6). - Add **/*.generated.api-checks.ts to .prettierignore: this generated file must match the CLI's raw output byte-for-byte for check:generated-types, and prettier was reformatting it. - Fix packages/csr/test/api-call.test.ts: no-unsafe-function-type lint error from the raw Function type, uncovered while running the full gate. - Rebuild editors/vscode bundles (packages/compiler and packages/syntax changed in Tasks 1-5). - Regenerate docs/public-api-0.8.json (additive: isIdentPart, isIdentStart, skipLiteralOrComment newly exported from packages/syntax). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
export interface Routes {
|
||||
"/": Record<string, never>;
|
||||
"/about": Record<string, never>;
|
||||
"/api-block-demo": Record<string, never>;
|
||||
"/async-data": Record<string, never>;
|
||||
"/chat": Record<string, never>;
|
||||
"/client-only": Record<string, never>;
|
||||
@@ -27,6 +28,7 @@ export interface Routes {
|
||||
export interface RouteNames {
|
||||
"index": "/";
|
||||
"about": "/about";
|
||||
"api.block.demo": "/api-block-demo";
|
||||
"async.data": "/async-data";
|
||||
"chat": "/chat";
|
||||
"client.only": "/client-only";
|
||||
@@ -119,6 +121,7 @@ export function route<N extends RouteName>(
|
||||
const paths: Record<RouteName, RoutePath> = {
|
||||
"index": "/",
|
||||
"about": "/about",
|
||||
"api.block.demo": "/api-block-demo",
|
||||
"async.data": "/async-data",
|
||||
"chat": "/chat",
|
||||
"client.only": "/client-only",
|
||||
|
||||
Reference in New Issue
Block a user