-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.ts
37 lines (30 loc) · 803 Bytes
/
types.ts
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
import type { Config as TJSGConfigOrig } from 'ts-json-schema-generator';
// TODO: Replace by full type defs (e.g. from ajv package)
export type IMockJSONSchema = {
$schema: string
definitions: object
[key: string]: any
}
export type TJSGConfig = TJSGConfigOrig
export type IConfig = {
/**
* Import path suffix
*/
suffix?: `?${string}`
/**
* `false` - don't generate dts file;
* `path as string` - generate by that path and name
*/
dts?: string | boolean
/**
* parser options
* @see https://github.com/vega/ts-json-schema-generator#options
*/
options?: Partial<Omit<TJSGConfigOrig, 'path' | 'type'>>
};
export type IConfigResolved = Required<IConfig & {
dts: string | false
}>
export type ISchemaFilesMetaList = Record<string, {
exports: string[]
}>