File tree Expand file tree Collapse file tree 12 files changed +88
-15
lines changed Expand file tree Collapse file tree 12 files changed +88
-15
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,16 @@ export const basePackageConfig = defineConfig({
28
28
allowMultiple : true ,
29
29
syntaxKind : 'block' ,
30
30
} ,
31
+ {
32
+ name : 'function' ,
33
+ allowMultiple : false ,
34
+ syntaxKind : 'modifier' ,
35
+ } ,
36
+ {
37
+ name : 'interface' ,
38
+ syntaxKind : 'modifier' ,
39
+ allowMultiple : false ,
40
+ } ,
31
41
] ,
32
42
} ,
33
43
} )
Original file line number Diff line number Diff line change 15
15
"tagName" : " @thoughtLevel" ,
16
16
"syntaxKind" : " block" ,
17
17
"allowMultiple" : true
18
+ },
19
+ {
20
+ "tagName" : " @interface" ,
21
+ "syntaxKind" : " modifier" ,
22
+ "allowMultiple" : false
23
+ },
24
+ {
25
+ "tagName" : " @function" ,
26
+ "syntaxKind" : " modifier" ,
27
+ "allowMultiple" : false
18
28
}
19
29
],
20
30
"supportForTags" : {
34
44
"@see" : true ,
35
45
"@thoughtLevel" : true ,
36
46
"@throws" : true ,
37
- "@todo" : true
47
+ "@todo" : true ,
48
+ "@interface" : true ,
49
+ "@function" : true
38
50
}
39
51
}
Original file line number Diff line number Diff line change 15
15
"tagName" : " @category" ,
16
16
"syntaxKind" : " block" ,
17
17
"allowMultiple" : true
18
+ },
19
+ {
20
+ "tagName" : " @function" ,
21
+ "syntaxKind" : " modifier" ,
22
+ "allowMultiple" : false
23
+ },
24
+ {
25
+ "tagName" : " @interface" ,
26
+ "syntaxKind" : " modifier" ,
27
+ "allowMultiple" : false
18
28
}
19
29
],
20
30
"supportForTags" : {
34
44
"@throws" : true ,
35
45
"@defaultValue" : true ,
36
46
"@todo" : true ,
37
- "@category" : true
47
+ "@category" : true ,
48
+ "@function" : true ,
49
+ "@interface" : true
38
50
}
39
51
}
Original file line number Diff line number Diff line change 10
10
"tagName" : " @todo" ,
11
11
"syntaxKind" : " block" ,
12
12
"allowMultiple" : true
13
+ },
14
+ {
15
+ "tagName" : " @function" ,
16
+ "syntaxKind" : " modifier" ,
17
+ "allowMultiple" : false
18
+ },
19
+ {
20
+ "tagName" : " @interface" ,
21
+ "syntaxKind" : " modifier" ,
22
+ "allowMultiple" : false
13
23
}
14
24
],
15
25
"supportForTags" : {
28
38
"@remarks" : true ,
29
39
"@throws" : true ,
30
40
"@defaultValue" : true ,
31
- "@todo" : true
41
+ "@todo" : true ,
42
+ "@function" : true ,
43
+ "@interface" : true
32
44
}
33
45
}
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ type UseCurrentUser = {
28
28
29
29
/**
30
30
* @public
31
+ * @function
31
32
* @TODO This should not return null — users of a custom app will always be authenticated via Core
32
33
*/
33
34
export const useCurrentUser : UseCurrentUser = createStateSourceHook ( getCurrentUserState )
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import {createStateSourceHook} from '../helpers/createStateSourceHook'
27
27
* ```
28
28
*
29
29
* @public
30
+ * @function
30
31
*/
31
32
export const useClient = createStateSourceHook ( {
32
33
getState : getClientState ,
Original file line number Diff line number Diff line change @@ -6,10 +6,10 @@ import {createStateSourceHook} from '../helpers/createStateSourceHook'
6
6
type UseDatasets = {
7
7
/**
8
8
*
9
- * Returns metadata for each dataset in your organization .
9
+ * Returns metadata for each dataset the current user has access to .
10
10
*
11
11
* @category Datasets
12
- * @returns The metadata for your organization's datasets
12
+ * @returns The metadata for your the datasets
13
13
*
14
14
* @example
15
15
* ```tsx
@@ -28,7 +28,10 @@ type UseDatasets = {
28
28
( ) : DatasetsResponse
29
29
}
30
30
31
- /** @public */
31
+ /**
32
+ * @public
33
+ * @function
34
+ */
32
35
export const useDatasets : UseDatasets = createStateSourceHook ( {
33
36
// remove `undefined` since we're suspending when that is the case
34
37
getState : getDatasetsState as ( instance : SanityInstance ) => StateSource < DatasetsResponse > ,
Original file line number Diff line number Diff line change @@ -25,6 +25,9 @@ type UseDocumentSyncStatus = {
25
25
( doc : DocumentHandle ) : boolean | undefined
26
26
}
27
27
28
- /** @beta */
28
+ /**
29
+ * @beta
30
+ * @function
31
+ */
29
32
export const useDocumentSyncStatus : UseDocumentSyncStatus =
30
33
createStateSourceHook ( getDocumentSyncStatus )
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ export interface UsePreviewResults {
36
36
* @param options - The document handle for the document you want to resolve preview values for, and an optional ref
37
37
* @returns The preview values for the given document and a boolean to indicate whether the resolution is pending
38
38
*
39
- * @example Combining with useDocuments to render a collection of document previews
39
+ * @example Combining with useInfiniteList to render a collection of document previews
40
40
* ```
41
41
* // PreviewComponent.jsx
42
42
* export default function PreviewComponent({ document }) {
@@ -51,12 +51,12 @@ export interface UsePreviewResults {
51
51
* }
52
52
*
53
53
* // DocumentList.jsx
54
- * const { data, isPending } = useDocuments ({ filter: '_type == "movie"' })
54
+ * const { data } = useInfiniteList ({ filter: '_type == "movie"' })
55
55
* return (
56
56
* <div>
57
57
* <h1>Movies</h1>
58
58
* <ul>
59
- * {isPending ? 'Loading…' : data.map(movie => (
59
+ * {data.map(movie => (
60
60
* <li key={movie._id}>
61
61
* <Suspense fallback='Loading…'>
62
62
* <PreviewComponent document={movie} />
Original file line number Diff line number Diff line change @@ -32,7 +32,10 @@ type UseProject = {
32
32
( projectId : string ) : SanityProject
33
33
}
34
34
35
- /** @public */
35
+ /**
36
+ * @public
37
+ * @function
38
+ */
36
39
export const useProject : UseProject = createStateSourceHook ( {
37
40
// remove `undefined` since we're suspending when that is the case
38
41
getState : getProjectState as (
You can’t perform that action at this time.
0 commit comments