Compare commits
No commits in common. "ee16fef38de545ab8d90418ac7f4ac1b555965c1" and "c29a4092ca4007dcdc3e3b4f255d97adca045679" have entirely different histories.
ee16fef38d
...
c29a4092ca
10
CLAUDE.md
10
CLAUDE.md
|
|
@ -109,13 +109,3 @@ bun --hot ./index.ts
|
||||||
```
|
```
|
||||||
|
|
||||||
For more information, read the Bun API docs in `node_modules/bun-types/docs/**.md`.
|
For more information, read the Bun API docs in `node_modules/bun-types/docs/**.md`.
|
||||||
|
|
||||||
## Type Declarations
|
|
||||||
|
|
||||||
This package exports raw `.tsx` source as the runtime entry (Bun handles it fine), but uses hand-written `.d.ts` files in `dist/` for the `types` export condition. This prevents consumers' `tsc` from type-checking our Hono JSX internals, which would fail if they use a different JSX runtime.
|
|
||||||
|
|
||||||
- When adding or changing exported functions/types, update the corresponding `.d.ts` file in `dist/` by hand.
|
|
||||||
- Do NOT add a build step to generate declarations. The `.d.ts` files are small and manually maintained.
|
|
||||||
- `dist/index.d.ts` — main exports (`Hype` class, `HypeProps`, `SSEHandler`, re-exports from utils/layout)
|
|
||||||
- `dist/utils.d.ts` — utility function signatures
|
|
||||||
- `dist/layout.d.ts` — `Layout` and `ReloadScript` FC declarations
|
|
||||||
|
|
|
||||||
13
package.json
13
package.json
|
|
@ -1,20 +1,13 @@
|
||||||
{
|
{
|
||||||
"name": "@because/hype",
|
"name": "@because/hype",
|
||||||
"version": "0.0.14",
|
"version": "0.0.13",
|
||||||
"module": "src/index.tsx",
|
"module": "src/index.tsx",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": {
|
".": "./src/index.tsx",
|
||||||
"types": "./dist/index.d.ts",
|
"./utils": "./src/utils.tsx"
|
||||||
"default": "./src/index.tsx"
|
|
||||||
},
|
|
||||||
"./utils": {
|
|
||||||
"types": "./dist/utils.d.ts",
|
|
||||||
"default": "./src/utils.tsx"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"dist",
|
|
||||||
"src/css",
|
"src/css",
|
||||||
"src/frontend.ts",
|
"src/frontend.ts",
|
||||||
"src/index.tsx",
|
"src/index.tsx",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user