Commit a04bb02
fix(jsr): drop slow types from next/react adapters; remove --allow-slow-types
JSR's slow-type analyzer flagged the two adapter factory functions
(createAhizeComponent, createUseAhize) as missing explicit return
types — both inferred their return through deeply generic React
component / hook signatures. Add explicit type aliases:
- NextAhizeComponent: the generic React component returned by
createAhizeComponent(React, nextNav).
- AhizeReactHook (now declared up-front instead of via ReturnType<>):
the useAhize hook returned by createUseAhize(React).
With both fixed, `npx jsr publish --dry-run` no longer reports any slow
types, so we drop the --allow-slow-types flag from the release workflow.
This also lifts the JSR score (slow-types was a Missing category) and
restores the score's "automatic .d.ts generation" benefit for Node.js
consumers who pull the package via JSR.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 072bf7b commit a04bb02
3 files changed
Lines changed: 11 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
54 | 59 | | |
55 | 60 | | |
56 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| |||
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
78 | | - | |
79 | | - | |
0 commit comments