functional-examplesFUNCTIONAL-EXAMPLES
DOCSEXAMPLESAPI
⌘K
GitHubnpm
Guides
  • Getting Started
  • Why functional-examples
  • Core Concepts
  • Plugins
  • Configuration
  • Testing Examples
  • Use Cases
Plugins
  • JavaScript Plugin
  • YAML Manifest Plugin
  • Test Plugin
  • Documentation Plugin
Advanced
  • Custom Extractors
  • Plugin Authoring
  • Snapshot Testing
  • CI Integration
Examples
  • CI Integration
  • Custom Extractor
  • Devkit README Snippets
  • Documentation Plugin
  • Getting Started
  • Getting Started
  • JavaScript Plugin
  • JSON Configuration
  • Metadata Validation
  • Mixed Plugins
  • Multi-Plugin Configuration
  • Plugin Authoring
  • Region Markers
  • Snapshot Testing
  • Test Assertions Reference
  • Test Plugin Example
  • YAML Manifest Plugin
API
  • @functional-examples/devkit
  • @functional-examples/documentation
  • @functional-examples/javascript
  • @functional-examples/test
  • @functional-examples/yaml-manifest
  • functional-examples
  • rehype-typedoc
  • vike-plugin-typedoc
GitHubGitHubnpmNPM
Guides
  • Getting Started
  • Why functional-examples
  • Core Concepts
  • Plugins
  • Configuration
  • Testing Examples
  • Use Cases
Plugins
  • JavaScript Plugin
  • YAML Manifest Plugin
  • Test Plugin
  • Documentation Plugin
Advanced
  • Custom Extractors
  • Plugin Authoring
  • Snapshot Testing
  • CI Integration
Examples
  • CI Integration
  • Custom Extractor
  • Devkit README Snippets
  • Documentation Plugin
  • Getting Started
  • Getting Started
  • JavaScript Plugin
  • JSON Configuration
  • Metadata Validation
  • Mixed Plugins
  • Multi-Plugin Configuration
  • Plugin Authoring
  • Region Markers
  • Snapshot Testing
  • Test Assertions Reference
  • Test Plugin Example
  • YAML Manifest Plugin
API
  • @functional-examples/devkit
  • @functional-examples/documentation
  • @functional-examples/javascript
  • @functional-examples/test
  • @functional-examples/yaml-manifest
  • functional-examples
  • rehype-typedoc
  • vike-plugin-typedoc
GitHubGitHubnpmNPM
FILEACCESSOR
API/@functional-examples/documentation/FileAccessor

FileAccessor

interface
interface FileAccessor

Chainable accessor returned by file() in both prose and guide contexts.

Supports two usage patterns:

  • <%= file('path.ts') %> — renders the whole file (calls toString())
  • <%= file('path.ts').region('id') %> — renders a scoped region

METHODS

region(regionId: string): string

Render a region within this file as a fenced code block.

toString(): string

Renders the whole file as a fenced code block (called implicitly by Eta's `<%= %>`).