@@ -43,8 +43,6 @@ type SnapshotIgnore =
4343
4444/**
4545 * Snapshot type that converts objects to readonly versions recursively
46- *
47- * @template T - Type to convert to a snapshot
4846 */
4947export type Snapshot < T > = T extends { $$valtioSnapshot : infer S }
5048 ? S
@@ -176,11 +174,6 @@ let createHandler: typeof createHandlerDefault = createHandlerDefault
176174
177175/**
178176 * Creates a reactive proxy object that can be tracked for changes
179- *
180- * @template T - Type of the object to be proxied
181- * @param {T } baseObject - The object to create a proxy for
182- * @returns {T } A proxied version of the input object
183- * @throws {Error } If the input is not an object
184177 */
185178export function proxy < T extends object > ( baseObject : T = { } as T ) : T {
186179 if ( ! isObject ( baseObject ) ) {
@@ -294,9 +287,6 @@ export function proxy<T extends object>(baseObject: T = {} as T): T {
294287
295288/**
296289 * Gets the current version number of a proxy object
297- *
298- * @param {unknown } proxyObject - The proxy object to get the version of
299- * @returns {number | undefined } The current version number, or undefined if not a proxy
300290 */
301291export function getVersion ( proxyObject : unknown ) : number | undefined {
302292 const proxyState = proxyStateMap . get ( proxyObject as object )
@@ -305,12 +295,6 @@ export function getVersion(proxyObject: unknown): number | undefined {
305295
306296/**
307297 * Subscribes to changes in a proxy object
308- *
309- * @template T - Type of the proxy object
310- * @param {T } proxyObject - The proxy object to subscribe to
311- * @param {Function } callback - Function called when the proxy object changes
312- * @param {boolean } [notifyInSync] - If true, notifications happen synchronously
313- * @returns {Function } Unsubscribe function to stop listening for changes
314298 */
315299export function subscribe < T extends object > (
316300 proxyObject : T ,
@@ -350,10 +334,6 @@ export function subscribe<T extends object>(
350334
351335/**
352336 * Creates an immutable snapshot of the current state of a proxy object
353- *
354- * @template T - Type of the proxy object
355- * @param {T } proxyObject - The proxy object to create a snapshot from
356- * @returns {Snapshot<T> } An immutable snapshot of the current state
357337 */
358338export function snapshot < T extends object > ( proxyObject : T ) : Snapshot < T > {
359339 const proxyState = proxyStateMap . get ( proxyObject as object )
@@ -369,10 +349,6 @@ export function snapshot<T extends object>(proxyObject: T): Snapshot<T> {
369349 *
370350 * Objects marked with ref will be kept as references in snapshots
371351 * instead of being deeply copied.
372- *
373- * @template T - Type of the object to mark as a reference
374- * @param {T } obj - The object to mark as a reference
375- * @returns {T & { $$valtioSnapshot: T } } The same object with a type marker
376352 */
377353export function ref < T extends object > ( obj : T ) {
378354 refSet . add ( obj )
0 commit comments