Skip to content

Commit fdfb859

Browse files
committed
docs: Update typedoc
- add typedoc-plugin-vue - add UseSelectReturn and UseCronReturn
1 parent a18abdd commit fdfb859

File tree

7 files changed

+44
-13
lines changed

7 files changed

+44
-13
lines changed

core/src/components/cron-core.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,16 @@ export function useCron(options: CronOptions) {
229229
}
230230
}
231231

232+
/**
233+
* @interface
234+
*/
235+
export type UseCronReturn = ReturnType<typeof useCron>
236+
232237
export function setupCron(
233238
options: CronOptions,
234239
modelValue: WatchSource<string | undefined>,
235240
{ emit }: SetupContext<['update:model-value', 'error']>,
236-
) {
241+
): UseCronReturn {
237242
const cron = useCron(options)
238243

239244
watch(

core/src/components/select.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,16 @@ export function useSelect<T, V>(options: SelectOptions<T, V>) {
192192
}
193193
}
194194

195+
/**
196+
* @interface
197+
*/
198+
export type UseSelectReturn<T, V> = ReturnType<typeof useSelect<T, V>>
199+
195200
export function setupSelect<T, V>(
196201
options: SelectOptions<T, V>,
197202
modelValue: WatchSource<V>,
198203
{ emit }: SetupContext<['update:model-value']>,
199-
) {
204+
): UseSelectReturn<T, V> {
200205
const s = useSelect(options)
201206

202207
watch(s.selected, () => {

core/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ export {
99
type CronContext,
1010
type CronCoreProps,
1111
type CronOptions,
12+
type UseCronReturn,
1213
} from './components/cron-core'
1314
export {
1415
RenderlessSelect,
1516
selectProps,
1617
setupSelect,
1718
useSelect,
1819
type SelectOptions,
20+
type UseSelectReturn,
1921
} from './components/select'
2022
export { Locale, getLocale } from './locale'
2123
export type * from './locale/types'

core/src/types.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,14 @@ export interface Field {
4343
}
4444

4545
export interface Period {
46+
/**
47+
* The id of the period
48+
*/
4649
id: string
50+
51+
/**
52+
* The value determines which fields are visible
53+
*/
4754
value: string[]
4855
}
4956

package-lock.json

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,16 @@
2929
"@rushstack/eslint-patch": "^1.5.1",
3030
"@semantic-release/git": "^10.0.1",
3131
"@semantic-release/github": "^9.2.1",
32+
"@tsconfig/node18": "^18.2.2",
33+
"@types/jsdom": "^21.1.3",
34+
"@types/node": "^18.18.5",
35+
"@vitejs/plugin-vue": "^4.4.0",
3236
"@vue-js-cron/generated": "file:./generated",
3337
"@vue/cli-service": "^5.0.8",
3438
"@vue/eslint-config-prettier": "^8.0.0",
3539
"@vue/eslint-config-typescript": "^12.0.0",
40+
"@vue/test-utils": "^2.4.1",
41+
"@vue/tsconfig": "^0.4.0",
3642
"eslint": "^8.52.0",
3743
"eslint-config-prettier": "^9.0.0",
3844
"eslint-config-standard": "^17.0.0",
@@ -41,25 +47,20 @@
4147
"eslint-plugin-prettier": "^5.0.1",
4248
"eslint-plugin-promise": "^6.0.0",
4349
"eslint-plugin-vue": "^9.18.1",
50+
"jsdom": "^22.1.0",
4451
"multi-semantic-release": "^3.0.2",
52+
"npm-run-all2": "^6.1.1",
4553
"prettier": "^3.0.3",
4654
"rollup": "^4.3.0",
4755
"rollup-plugin-css-only": "^4.5.0",
4856
"rollup-plugin-vue": "^6.0.0",
49-
"vue": "^3.3.4",
5057
"typedoc": "^0.25.3",
51-
"@tsconfig/node18": "^18.2.2",
52-
"@types/jsdom": "^21.1.3",
53-
"@types/node": "^18.18.5",
54-
"@vitejs/plugin-vue": "^4.4.0",
55-
"@vue/tsconfig": "^0.4.0",
56-
"@vue/test-utils": "^2.4.1",
57-
"jsdom": "^22.1.0",
58-
"npm-run-all2": "^6.1.1",
58+
"typedoc-plugin-vue": "^1.1.0",
5959
"typescript": "~5.2.0",
6060
"vite": "^4.4.11",
61+
"vite-plugin-dts": "^3.6.3",
6162
"vitest": "^0.34.4",
62-
"vue-tsc": "^1.8.19",
63-
"vite-plugin-dts": "^3.6.3"
63+
"vue": "^3.3.4",
64+
"vue-tsc": "^1.8.19"
6465
}
6566
}

typedoc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
"entryPoints": ["core", "light", "ant"],
44
"entryPointStrategy": "packages",
55
"out": "typedoc",
6+
"plugin": ["typedoc-plugin-vue"]
67
}

0 commit comments

Comments
 (0)