claude-code-types 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +3 -0
- package/index.d.ts +2 -0
- package/package.json +1 -1
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# claude-code-types
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/claude-code-types)
|
|
4
|
+
|
|
3
5
|
TypeScript type definitions for [Claude Code](https://docs.anthropic.com/en/docs/claude-code) chat history JSONL files.
|
|
4
6
|
|
|
5
7
|
Claude Code stores conversation history at `~/.claude/projects/<project-slug>/<session-id>.jsonl`. Each line is a JSON object. This package provides full type coverage for all entry types.
|
|
@@ -16,6 +18,7 @@ npm install claude-code-types
|
|
|
16
18
|
import type { TranscriptEntry } from 'claude-code-types';
|
|
17
19
|
import { readFileSync } from 'fs';
|
|
18
20
|
|
|
21
|
+
const path = '~/.claude/projects/my-project/abc123.jsonl';
|
|
19
22
|
const entries: TranscriptEntry[] = readFileSync(path, 'utf-8')
|
|
20
23
|
.split('\n')
|
|
21
24
|
.filter(Boolean)
|
package/index.d.ts
CHANGED