DocumentSignals
Defined in: packages/core/src/parser/document-text.ts:51
What the caller knows about where the text came from. Each is optional;
the first that names a format wins, in this order: scriptType, the
extension of url (or fileName), the extension of responseUrl, then
contentType. Text with no signal is sniffed.
Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
contentType? | string | null | A response Content-Type. Only YAML, JSON (including +json, such as application/geo+json) and TOML media types count. text/plain and application/octet-stream are no signal. | packages/core/src/parser/document-text.ts:65 |
fileName? | string | A file name or path, as the CLI and Astro read it. | packages/core/src/parser/document-text.ts:57 |
responseUrl? | string | The response’s final URL after redirects. | packages/core/src/parser/document-text.ts:59 |
scriptType? | string | null | An inline <script type>. | packages/core/src/parser/document-text.ts:53 |
url? | string | The requested URL. Only its pathname counts, so map.toml?v=3 is TOML. | packages/core/src/parser/document-text.ts:55 |