Skip to content
This repository was archived by the owner on Mar 12, 2026. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions fern/pages/contribute/repos/doc-detective-common.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,30 @@ title: doc-detective-common
The source code lives in the [`doc-detective`](https://github.com/doc-detective/doc-detective) monorepo under `src/common/`, but the package is still published independently to NPM.

This package doesn't depend on any other Doc Detective packages.

## Public API

The package exports these modules:

### Functions and utilities

- `schemas`: JSON schema definitions for test actions and configuration
- `validate`: Schema validation logic
- `detectTests`: Logic to detect tests in documentation files

### TypeScript types
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Citation: PR #194 adds type-only re-exports in src/common/src/index.ts for 6 core structural types: Specification, Test, Step, Context, Config, Report. These types come from src/common/src/types/generated/ and are now publicly accessible.
View source


The package exports types for Doc Detective's core data structures:

```typescript
import type { Specification, Test, Step, Context, Config, Report } from 'doc-detective-common';
```

- `Specification`: A test specification containing tests and configuration
- `Test`: An individual test with steps
- `Step`: A single action within a test
- `Context`: Browser/platform context for running tests
- `Config`: Configuration options
- `Report`: Test result report

Using these types keeps your code in sync with schema changes.