-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtypedef.js
48 lines (45 loc) · 1.38 KB
/
typedef.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/**
* @typedef {Object} TemplateConfig
* @property {Object.<string, TemplateConfigEntry>} versions
*/
/**
* @typedef {Object} TemplateConfigEntry
* @property {TemplateRepoConfig[]} templatesRepos
* @property {{label: string, value: string, hint?: string, initial?: boolean}[]} features
*/
/**
* @typedef {Object} TemplateRepoConfig
* @property {string} url
* @property {string=} path
* @property {string=} name
* @property {string=} description
* @property {'directory'|'single'} templateType
* @property {string} author
* @property {boolean} includeByDefault
* @property {boolean=} requireManifest
*/
/**
* @typedef {Object} Template
* @property {string} dir
* @property {string} name
* @property {string=} description
* @property {TemplateManifest} manifest
*
* @typedef {Object} TemplateManifest
* @property {string} name
* @property {string} description
* @property {Object} test
* @property {TestTemplate[]} test.tests
* @property {{label: string, value: string, hint?: string, initial?: boolean}[]} features
* @property {function} postInstall
* @property {function} preInstall
* @property {any=} error
*
* @typedef {TestTemplateString | TestTemplateObject} TestTemplate
*
* @typedef {string} TestTemplateString
*
* @typedef {Object} TestTemplateObject
* @property {string} page - the page to test
* @property {string} contains - the string to look for in the page
*/