Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,20 @@ Both are FOSS with independent governance (no Big Tech).

### TypeScript Exemptions (Approved)

The "no new TypeScript" rule has eight approved exemptions in this repo. These paths are *not* policy violations — they are documented carve-outs because the file format or downstream consumer requires TypeScript:
The "no new TypeScript" rule has seven approved exemptions in this repo. These paths are *not* policy violations — they are documented carve-outs because the file format or downstream consumer requires TypeScript:

| Path | Files | Rationale | Unblock condition |
|---|---|---|---|
| `packages/affine-js/types.d.ts` | 1 | TypeScript declaration file — the public API contract by which JS callers consume AffineScript-compiled artefacts. `.d.ts` is TS by definition. | Generate from canonical compiler output (issue: see ROADMAP). |
| `packages/affine-ts/types.d.ts` | 1 | Same, for TS callers. | Same as above. |
| `affinescript-deno-test/*.ts` | 6 | Deno-based test harness for AffineScript itself: `cli.ts`, `mod.ts`, `lib/{compile,discover,runner}.ts`, `example/smoke_driver.ts`. Deno test runner is TS-native. | AffineScript stdlib + Deno bindings (no scheduled issue). |

Adding to this list requires explicit user approval and an unblock condition. New TypeScript files outside this list are still banned per the policy table above.

**Closed exemptions:**
- `editors/vscode/src/extension.ts` — closed 2026-05-03 by issue #35 Phase 3 (Node-target codegen + Vscode bindings landed). Source of truth is now `editors/vscode/src/extension.affine`, compiled to `out/extension.cjs`. Re-introducing the .ts file is blocked by `tools/check-no-extension-ts.sh` (wired into `just check` and `.github/workflows/ci.yml`).
- `packages/affine-ts/` — removed 2026-05-11 (issue #66 closed won't-do). TypeScript is not a first-class consumer; TS callers should use `@hyperpolymath/affine-js` directly and supply their own typings.

The 5 external references to `affinescript-deno-test/` (CI workflow, status docs, history docs) and the 3 references to `packages/affine-{js,ts}/` (status docs, Deno config) are why physical relocation into a `vendor/` subtree was rejected — the relocation cost exceeded the visibility benefit when the directories are already named clearly.
The 5 external references to `affinescript-deno-test/` (CI workflow, status docs, history docs) and the references to `packages/affine-js/` (status docs, Deno config) are why physical relocation into a `vendor/` subtree was rejected — the relocation cost exceeded the visibility benefit when the directories are already named clearly.

### Package Management

Expand Down
6 changes: 4 additions & 2 deletions packages/affine-js/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,10 @@ All JS ↔ WASM value exchanges use the `AffineValue` tagged-union type:
package without any additional steps — the type definitions are automatically
picked up by `tsc` and editors.

For TypeScript projects, the companion `@hyperpolymath/affine-ts` package
provides enhanced declarations with stricter generics.
TypeScript is not a first-class consumer in the AffineScript ecosystem. There
is no `@hyperpolymath/affine-ts` package; TS callers should consume
`@hyperpolymath/affine-js` directly via the shipped `.d.ts` and supply any
project-specific typings themselves.

== Return type hints

Expand Down
100 changes: 0 additions & 100 deletions packages/affine-ts/README.adoc

This file was deleted.

11 changes: 0 additions & 11 deletions packages/affine-ts/deno.json

This file was deleted.

188 changes: 0 additions & 188 deletions packages/affine-ts/mod.js

This file was deleted.

Loading
Loading