[...slug].ts — astro Source File
Architecture documentation for [...slug].ts, a typescript file in the astro codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 1a7e4d78_ece3_84aa_0cb2_dc81e7a60972["[...slug].ts"] f16d8c76_2866_6150_bd14_0347b59abfe9["astro"] 1a7e4d78_ece3_84aa_0cb2_dc81e7a60972 --> f16d8c76_2866_6150_bd14_0347b59abfe9 style 1a7e4d78_ece3_84aa_0cb2_dc81e7a60972 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import type { APIRoute } from 'astro';
// No undefined so should not error
const slugs = ['one'];
export const GET: APIRoute = ({ params }) => {
return Response.json({
slug: params.slug || 'index',
});
};
export function getStaticPaths() {
return slugs.map((u) => ({ params: { slug: u } }));
}
Domain
Subdomains
Functions
Dependencies
- astro
Source
Frequently Asked Questions
What does [...slug].ts do?
[...slug].ts is a source file in the astro codebase, written in typescript. It belongs to the IntegrationAdapters domain, SsrAdapters subdomain.
What functions are defined in [...slug].ts?
[...slug].ts defines 2 function(s): GET, getStaticPaths.
What does [...slug].ts depend on?
[...slug].ts imports 1 module(s): astro.
Where is [...slug].ts in the architecture?
[...slug].ts is located at packages/astro/test/fixtures/dynamic-endpoint-collision/src/pages/api/safe/[...slug].ts (domain: IntegrationAdapters, subdomain: SsrAdapters, directory: packages/astro/test/fixtures/dynamic-endpoint-collision/src/pages/api/safe).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free