Skip to content

Commit 76ebb6a

Browse files
yinlianghuiclaude
andauthored
docs(api): record the os:check decision for client-sdk.mdx, and fence its JSX as tsx (#12045)
The page has 13 TypeScript fences and 0 os:check markers. Marking them was measured rather than assumed: all 13 marked at once produce 128 diagnostics and not one is a doc-vs-SDK divergence. Two structural reasons, neither fixable on this page: - content/docs/** belongs to check:skill-examples' "skills + docs" surface, whose paths map derives from @objectstack/spec alone, and spec does not depend on @objectstack/client. Every fence importing the SDK reds TS2307. - The remaining fences are deliberate continuation fragments sharing the Quick Start's `client`, so they red TS2304. Making either class compile would mean hand-declaring the SDK's own types or injecting casts into prose whose subject is the real API. Also retags the React Hooks block tsx (it is JSX). The gate writes each block out with its fence's extension, so as `typescript` a marker on it produced only TS1xxx syntax errors -- and tsc never runs the semantic pass after those, which suppressed type-checking for every marked block across skills/ and content/docs/ (measured: 128 semantic diagnostics collapse to 0). check:doc-authoring accepts tsx, so the block stays visible to it. Part of #11942 Claude-Session: https://claude.ai/code/session_01UjM2ia8Av1v5NqfqQEQmC6 Co-authored-by: Claude <noreply@anthropic.com>
1 parent f658793 commit 76ebb6a

1 file changed

Lines changed: 36 additions & 1 deletion

File tree

content/docs/api/client-sdk.mdx

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,41 @@ The `@objectstack/client` is the official TypeScript client for ObjectStack. It
2525
pnpm add @objectstack/client
2626
```
2727

28+
{/*
29+
CONTRIBUTOR NOTE — none of this page's TypeScript fences carries an
30+
`os:check` marker, and that is a recorded decision rather than an omission.
31+
32+
`check:skill-examples` compiles marked blocks per SURFACE. `content/docs/**`
33+
belongs to the "skills + docs" surface, whose resolution dir and `paths` map
34+
are derived from `@objectstack/spec` alone — and `@objectstack/spec` does not
35+
depend on `@objectstack/client`. So a marker on any fence that imports the SDK
36+
reds with TS2307 "Cannot find module '@objectstack/client'" — a
37+
surface-resolution gap, not doc-vs-SDK drift.
38+
39+
Every other fence is a deliberate continuation fragment: Quick Start
40+
establishes `client` once and each later block continues that implied context,
41+
so a marker there reds with TS2304 "Cannot find name 'client'". Making either
42+
class compile would mean hand-declaring the SDK's own types, or injecting
43+
casts into prose whose subject IS the real API — pinning each example to
44+
itself and teaching worse code than the page teaches now.
45+
46+
Measured on this page (all 13 fences marked, then reverted): 128 diagnostics,
47+
every one TS2307 / TS2304 / TS18004 / TS18046 / TS2591 / TS7006 / TS7026 /
48+
TS2875. Not one was a doc-vs-SDK divergence.
49+
50+
The React Hooks block near the end is fenced tsx, not typescript, because it
51+
IS JSX: the gate writes every block out with its fence's own extension, and
52+
JSX in a .ts file is a syntax error. That reaches past this page — tsc stops
53+
at syntax errors and never runs the semantic pass, so one such block would
54+
suppress type-checking for every marked block across skills/ and
55+
content/docs/ (measured here: 128 semantic diagnostics collapse to 0). Please
56+
do not retag it back.
57+
58+
The marker becomes worth adding here the day the docs surface can resolve
59+
`@objectstack/client` — the same condition recorded in
60+
content/docs/kernel/runtime-services/data-service.mdx.
61+
*/}
62+
2863
## Quick Start
2964

3065
```typescript
@@ -636,7 +671,7 @@ For React applications, use `@objectstack/client-react`:
636671
pnpm add @objectstack/client-react
637672
```
638673

639-
```typescript
674+
```tsx
640675
import { ObjectStackProvider, useClient, useQuery } from '@objectstack/client-react';
641676
import { ObjectStackClient } from '@objectstack/client';
642677

0 commit comments

Comments
 (0)