Skip to content

Commit 0361beb

Browse files
committed
docs(json): fix @example import path to real export
The @example in `getEditableJsonClass` imports from `@socketsecurity/lib/json`, which is not a package.json export — only `./json/edit`, `./json/format`, `./json/parse`, `./json/types` exist. Consumers copy-pasting this snippet would hit "Cannot find module" at runtime. Points at the correct subpath the test file already uses.
1 parent c2011eb commit 0361beb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/json/edit.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ async function retryWrite(
158158
*
159159
* @example
160160
* ```ts
161-
* import { getEditableJsonClass } from '@socketsecurity/lib/json'
161+
* import { getEditableJsonClass } from '@socketsecurity/lib/json/edit'
162162
*
163163
* const EditableJson = getEditableJsonClass<MyConfigType>()
164164
* const config = await EditableJson.load('./config.json')

0 commit comments

Comments
 (0)