Unverified Commit cc710321 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

docs: clarify id, filePath, and pathname in STATIC_FILE adapter output (#92227)

## What

Adds documentation for the `id`, `filePath`, and `pathname` properties
in the `STATIC_FILE` adapter output type.

## Why

These three string properties were previously undocumented or had
ambiguous descriptions. Based on feedback from the team:
- `id` is a unique identifier for the static file output
- `filePath` is the absolute filesystem path to the built file
- `pathname` is the routable URL pathname

## Changes

- Added JSDoc comments to the `STATIC_FILE` type definition in
`build-complete.ts`
- Updated the MDX documentation in `output-types.mdx` with clearer
inline comments
parent 01f7cd13
......@@ -166,9 +166,9 @@ Static assets and auto-statically optimized pages:
```typescript
{
type: 'STATIC_FILE'
id: string // Route identifier
filePath: string // Path to the built file
pathname: string // URL pathname
id: string // Unique identifier for this static file output
filePath: string // Absolute filesystem path to the built file
pathname: string // The routable URL pathname for this static file
immutableHash: string | undefined // Content hash when the filename contains a hash, indicating the file is immutable
}
```
......
......@@ -275,8 +275,17 @@ export interface AdapterOutput {
* that does not use ISR
*/
STATIC_FILE: {
/**
* Unique identifier for this static file output
*/
id: string
/**
* Absolute filesystem path to the built file
*/
filePath: string
/**
* The routable URL pathname for this static file
*/
pathname: string
type: AdapterOutputType.STATIC_FILE
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment