nestjs-openapi-next 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +211 -0
- package/bun.lock +2154 -0
- package/dist/constants.d.ts +23 -0
- package/dist/constants.js +26 -0
- package/dist/decorators/api-basic.decorator.d.ts +1 -0
- package/dist/decorators/api-basic.decorator.js +7 -0
- package/dist/decorators/api-bearer.decorator.d.ts +1 -0
- package/dist/decorators/api-bearer.decorator.js +7 -0
- package/dist/decorators/api-body.decorator.d.ts +16 -0
- package/dist/decorators/api-body.decorator.js +22 -0
- package/dist/decorators/api-callbacks.decorator.d.ts +2 -0
- package/dist/decorators/api-callbacks.decorator.js +8 -0
- package/dist/decorators/api-consumes.decorator.d.ts +1 -0
- package/dist/decorators/api-consumes.decorator.js +8 -0
- package/dist/decorators/api-cookie.decorator.d.ts +1 -0
- package/dist/decorators/api-cookie.decorator.js +7 -0
- package/dist/decorators/api-default-getter.decorator.d.ts +2 -0
- package/dist/decorators/api-default-getter.decorator.js +12 -0
- package/dist/decorators/api-exclude-controller.decorator.d.ts +1 -0
- package/dist/decorators/api-exclude-controller.decorator.js +8 -0
- package/dist/decorators/api-exclude-endpoint.decorator.d.ts +1 -0
- package/dist/decorators/api-exclude-endpoint.decorator.js +10 -0
- package/dist/decorators/api-extension.decorator.d.ts +1 -0
- package/dist/decorators/api-extension.decorator.js +38 -0
- package/dist/decorators/api-extra-models.decorator.d.ts +1 -0
- package/dist/decorators/api-extra-models.decorator.js +17 -0
- package/dist/decorators/api-header.decorator.d.ts +7 -0
- package/dist/decorators/api-header.decorator.js +37 -0
- package/dist/decorators/api-hide-property.decorator.d.ts +1 -0
- package/dist/decorators/api-hide-property.decorator.js +6 -0
- package/dist/decorators/api-link.decorator.d.ts +7 -0
- package/dist/decorators/api-link.decorator.js +21 -0
- package/dist/decorators/api-oauth2.decorator.d.ts +1 -0
- package/dist/decorators/api-oauth2.decorator.js +7 -0
- package/dist/decorators/api-operation.decorator.d.ts +5 -0
- package/dist/decorators/api-operation.decorator.js +12 -0
- package/dist/decorators/api-param.decorator.d.ts +22 -0
- package/dist/decorators/api-param.decorator.js +17 -0
- package/dist/decorators/api-produces.decorator.d.ts +1 -0
- package/dist/decorators/api-produces.decorator.js +8 -0
- package/dist/decorators/api-property.decorator.d.ts +15 -0
- package/dist/decorators/api-property.decorator.js +48 -0
- package/dist/decorators/api-query-method.decorator.d.ts +1 -0
- package/dist/decorators/api-query-method.decorator.js +8 -0
- package/dist/decorators/api-query.decorator.d.ts +24 -0
- package/dist/decorators/api-query.decorator.js +25 -0
- package/dist/decorators/api-response.decorator.d.ts +39 -0
- package/dist/decorators/api-response.decorator.js +55 -0
- package/dist/decorators/api-schema.decorator.d.ts +6 -0
- package/dist/decorators/api-schema.decorator.js +8 -0
- package/dist/decorators/api-security-device-flow.decorator.d.ts +1 -0
- package/dist/decorators/api-security-device-flow.decorator.js +7 -0
- package/dist/decorators/api-security.decorator.d.ts +2 -0
- package/dist/decorators/api-security.decorator.js +25 -0
- package/dist/decorators/api-streaming-response.decorator.d.ts +7 -0
- package/dist/decorators/api-streaming-response.decorator.js +9 -0
- package/dist/decorators/api-tag-group.decorator.d.ts +11 -0
- package/dist/decorators/api-tag-group.decorator.js +13 -0
- package/dist/decorators/api-use-tags.decorator.d.ts +1 -0
- package/dist/decorators/api-use-tags.decorator.js +8 -0
- package/dist/decorators/helpers.d.ts +8 -0
- package/dist/decorators/helpers.js +123 -0
- package/dist/decorators/index.d.ts +28 -0
- package/dist/decorators/index.js +48 -0
- package/dist/document-builder.d.ts +29 -0
- package/dist/document-builder.js +142 -0
- package/dist/explorers/api-callbacks.explorer.d.ts +2 -0
- package/dist/explorers/api-callbacks.explorer.js +36 -0
- package/dist/explorers/api-consumes.explorer.d.ts +5 -0
- package/dist/explorers/api-consumes.explorer.js +11 -0
- package/dist/explorers/api-exclude-controller.explorer.d.ts +2 -0
- package/dist/explorers/api-exclude-controller.explorer.js +10 -0
- package/dist/explorers/api-exclude-endpoint.explorer.d.ts +2 -0
- package/dist/explorers/api-exclude-endpoint.explorer.js +6 -0
- package/dist/explorers/api-extra-models.explorer.d.ts +3 -0
- package/dist/explorers/api-extra-models.explorer.js +11 -0
- package/dist/explorers/api-headers.explorer.d.ts +7 -0
- package/dist/explorers/api-headers.explorer.js +9 -0
- package/dist/explorers/api-operation.explorer.d.ts +2 -0
- package/dist/explorers/api-operation.explorer.js +43 -0
- package/dist/explorers/api-parameters.explorer.d.ts +71 -0
- package/dist/explorers/api-parameters.explorer.js +47 -0
- package/dist/explorers/api-produces.explorer.d.ts +5 -0
- package/dist/explorers/api-produces.explorer.js +11 -0
- package/dist/explorers/api-response.explorer.d.ts +13 -0
- package/dist/explorers/api-response.explorer.js +103 -0
- package/dist/explorers/api-security.explorer.d.ts +5 -0
- package/dist/explorers/api-security.explorer.js +13 -0
- package/dist/explorers/api-use-tags.explorer.d.ts +5 -0
- package/dist/explorers/api-use-tags.explorer.js +18 -0
- package/dist/extra/swagger-shim.d.ts +100 -0
- package/dist/extra/swagger-shim.js +367 -0
- package/dist/fixtures/document.base.d.ts +2 -0
- package/dist/fixtures/document.base.js +16 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +23 -0
- package/dist/interfaces/callback-object.interface.d.ts +12 -0
- package/dist/interfaces/callback-object.interface.js +2 -0
- package/dist/interfaces/denormalized-doc-resolvers.interface.d.ts +7 -0
- package/dist/interfaces/denormalized-doc-resolvers.interface.js +2 -0
- package/dist/interfaces/denormalized-doc.interface.d.ts +8 -0
- package/dist/interfaces/denormalized-doc.interface.js +2 -0
- package/dist/interfaces/enum-schema-attributes.interface.d.ts +2 -0
- package/dist/interfaces/enum-schema-attributes.interface.js +2 -0
- package/dist/interfaces/index.d.ts +3 -0
- package/dist/interfaces/index.js +18 -0
- package/dist/interfaces/module-route.interface.d.ts +2 -0
- package/dist/interfaces/module-route.interface.js +2 -0
- package/dist/interfaces/open-api-spec.interface.d.ts +252 -0
- package/dist/interfaces/open-api-spec.interface.js +2 -0
- package/dist/interfaces/schema-object-metadata.interface.d.ts +30 -0
- package/dist/interfaces/schema-object-metadata.interface.js +2 -0
- package/dist/interfaces/swagger-custom-options.interface.d.ts +24 -0
- package/dist/interfaces/swagger-custom-options.interface.js +2 -0
- package/dist/interfaces/swagger-document-options.interface.d.ts +10 -0
- package/dist/interfaces/swagger-document-options.interface.js +2 -0
- package/dist/interfaces/swagger-ui-init-options.interface.d.ts +7 -0
- package/dist/interfaces/swagger-ui-init-options.interface.js +2 -0
- package/dist/interfaces/swagger-ui-options.interface.d.ts +15 -0
- package/dist/interfaces/swagger-ui-options.interface.js +2 -0
- package/dist/plugin/compiler-plugin.d.ts +2 -0
- package/dist/plugin/compiler-plugin.js +30 -0
- package/dist/plugin/index.d.ts +2 -0
- package/dist/plugin/index.js +18 -0
- package/dist/plugin/merge-options.d.ts +17 -0
- package/dist/plugin/merge-options.js +37 -0
- package/dist/plugin/metadata-loader.d.ts +7 -0
- package/dist/plugin/metadata-loader.js +51 -0
- package/dist/plugin/plugin-constants.d.ts +3 -0
- package/dist/plugin/plugin-constants.js +6 -0
- package/dist/plugin/plugin-debug-logger.d.ts +5 -0
- package/dist/plugin/plugin-debug-logger.js +7 -0
- package/dist/plugin/utils/ast-utils.d.ts +30 -0
- package/dist/plugin/utils/ast-utils.js +273 -0
- package/dist/plugin/utils/is-filename-matched.util.d.ts +1 -0
- package/dist/plugin/utils/is-filename-matched.util.js +5 -0
- package/dist/plugin/utils/plugin-utils.d.ts +30 -0
- package/dist/plugin/utils/plugin-utils.js +307 -0
- package/dist/plugin/utils/type-reference-to-identifier.util.d.ts +7 -0
- package/dist/plugin/utils/type-reference-to-identifier.util.js +52 -0
- package/dist/plugin/visitors/abstract.visitor.d.ts +4 -0
- package/dist/plugin/visitors/abstract.visitor.js +30 -0
- package/dist/plugin/visitors/controller-class.visitor.d.ts +20 -0
- package/dist/plugin/visitors/controller-class.visitor.js +265 -0
- package/dist/plugin/visitors/model-class.visitor.d.ts +35 -0
- package/dist/plugin/visitors/model-class.visitor.js +514 -0
- package/dist/plugin/visitors/readonly.visitor.d.ts +21 -0
- package/dist/plugin/visitors/readonly.visitor.js +40 -0
- package/dist/services/constants.d.ts +1 -0
- package/dist/services/constants.js +4 -0
- package/dist/services/decorators-properties.d.ts +21 -0
- package/dist/services/decorators-properties.js +149 -0
- package/dist/services/mimetype-content-wrapper.d.ts +4 -0
- package/dist/services/mimetype-content-wrapper.js +11 -0
- package/dist/services/model-properties-accessor.d.ts +6 -0
- package/dist/services/model-properties-accessor.js +37 -0
- package/dist/services/parameter-metadata-accessor.d.ts +22 -0
- package/dist/services/parameter-metadata-accessor.js +41 -0
- package/dist/services/parameters-metadata-mapper.d.ts +9 -0
- package/dist/services/parameters-metadata-mapper.js +38 -0
- package/dist/services/response-object-factory.d.ts +28 -0
- package/dist/services/response-object-factory.js +120 -0
- package/dist/services/response-object-mapper.d.ts +39 -0
- package/dist/services/response-object-mapper.js +38 -0
- package/dist/services/schema-object-factory.d.ts +156 -0
- package/dist/services/schema-object-factory.js +471 -0
- package/dist/services/swagger-types-mapper.d.ts +260 -0
- package/dist/services/swagger-types-mapper.js +107 -0
- package/dist/storages/global-parameters.storage.d.ts +8 -0
- package/dist/storages/global-parameters.storage.js +22 -0
- package/dist/storages/global-responses.storage.d.ts +10 -0
- package/dist/storages/global-responses.storage.js +21 -0
- package/dist/swagger-explorer.d.ts +41 -0
- package/dist/swagger-explorer.js +326 -0
- package/dist/swagger-module.d.ts +27 -0
- package/dist/swagger-module.js +223 -0
- package/dist/swagger-scanner.d.ts +25 -0
- package/dist/swagger-scanner.js +116 -0
- package/dist/swagger-transformer.d.ts +4 -0
- package/dist/swagger-transformer.js +22 -0
- package/dist/swagger-ui/constants.d.ts +3 -0
- package/dist/swagger-ui/constants.js +132 -0
- package/dist/swagger-ui/helpers.d.ts +2 -0
- package/dist/swagger-ui/helpers.js +16 -0
- package/dist/swagger-ui/index.d.ts +1 -0
- package/dist/swagger-ui/index.js +17 -0
- package/dist/swagger-ui/swagger-ui.d.ts +4 -0
- package/dist/swagger-ui/swagger-ui.js +62 -0
- package/dist/type-helpers/index.d.ts +4 -0
- package/dist/type-helpers/index.js +20 -0
- package/dist/type-helpers/intersection-type.helper.d.ts +8 -0
- package/dist/type-helpers/intersection-type.helper.js +42 -0
- package/dist/type-helpers/mapped-types.utils.d.ts +2 -0
- package/dist/type-helpers/mapped-types.utils.js +31 -0
- package/dist/type-helpers/omit-type.helper.d.ts +2 -0
- package/dist/type-helpers/omit-type.helper.js +40 -0
- package/dist/type-helpers/partial-type.helper.d.ts +4 -0
- package/dist/type-helpers/partial-type.helper.js +49 -0
- package/dist/type-helpers/pick-type.helper.d.ts +2 -0
- package/dist/type-helpers/pick-type.helper.js +40 -0
- package/dist/types/swagger-enum.type.d.ts +1 -0
- package/dist/types/swagger-enum.type.js +2 -0
- package/dist/utils/assign-two-levels-deep.d.ts +1 -0
- package/dist/utils/assign-two-levels-deep.js +12 -0
- package/dist/utils/enum.utils.d.ts +9 -0
- package/dist/utils/enum.utils.js +65 -0
- package/dist/utils/extend-metadata.util.d.ts +2 -0
- package/dist/utils/extend-metadata.util.js +11 -0
- package/dist/utils/get-global-prefix.d.ts +2 -0
- package/dist/utils/get-global-prefix.js +7 -0
- package/dist/utils/get-schema-path.util.d.ts +4 -0
- package/dist/utils/get-schema-path.util.js +26 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +17 -0
- package/dist/utils/is-body-parameter.util.d.ts +2 -0
- package/dist/utils/is-body-parameter.util.js +6 -0
- package/dist/utils/is-built-in-type.util.d.ts +2 -0
- package/dist/utils/is-built-in-type.util.js +8 -0
- package/dist/utils/is-date-ctor.util.d.ts +2 -0
- package/dist/utils/is-date-ctor.util.js +6 -0
- package/dist/utils/merge-and-uniq.util.d.ts +1 -0
- package/dist/utils/merge-and-uniq.util.js +7 -0
- package/dist/utils/normalize-rel-path.d.ts +1 -0
- package/dist/utils/normalize-rel-path.js +7 -0
- package/dist/utils/remove-undefined-keys.d.ts +5 -0
- package/dist/utils/remove-undefined-keys.js +11 -0
- package/dist/utils/resolve-path.util.d.ts +1 -0
- package/dist/utils/resolve-path.util.js +7 -0
- package/dist/utils/reverse-object-keys.util.d.ts +1 -0
- package/dist/utils/reverse-object-keys.util.js +11 -0
- package/dist/utils/sort-object-lexicographically.d.ts +5 -0
- package/dist/utils/sort-object-lexicographically.js +11 -0
- package/dist/utils/strip-last-slash.util.d.ts +1 -0
- package/dist/utils/strip-last-slash.util.js +8 -0
- package/dist/utils/validate-global-prefix.util.d.ts +1 -0
- package/dist/utils/validate-global-prefix.util.js +5 -0
- package/dist/utils/validate-path.util.d.ts +1 -0
- package/dist/utils/validate-path.util.js +5 -0
- package/eslint.config.mjs +47 -0
- package/nest-cli.json +6 -0
- package/package.json +116 -0
- package/plugin.js +10 -0
- package/tsconfig.build.json +21 -0
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
export interface OpenAPIObject {
|
|
2
|
+
openapi: string;
|
|
3
|
+
info: InfoObject;
|
|
4
|
+
servers?: ServerObject[];
|
|
5
|
+
paths: PathsObject;
|
|
6
|
+
components?: ComponentsObject;
|
|
7
|
+
security?: SecurityRequirementObject[];
|
|
8
|
+
tags?: TagObject[];
|
|
9
|
+
externalDocs?: ExternalDocumentationObject;
|
|
10
|
+
}
|
|
11
|
+
export interface InfoObject {
|
|
12
|
+
title: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
termsOfService?: string;
|
|
15
|
+
contact?: ContactObject;
|
|
16
|
+
license?: LicenseObject;
|
|
17
|
+
version: string;
|
|
18
|
+
}
|
|
19
|
+
export interface ContactObject {
|
|
20
|
+
name?: string;
|
|
21
|
+
url?: string;
|
|
22
|
+
email?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface LicenseObject {
|
|
25
|
+
name: string;
|
|
26
|
+
url?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface ServerObject {
|
|
29
|
+
url: string;
|
|
30
|
+
description?: string;
|
|
31
|
+
variables?: Record<string, ServerVariableObject>;
|
|
32
|
+
}
|
|
33
|
+
export interface ServerVariableObject {
|
|
34
|
+
enum?: string[] | boolean[] | number[];
|
|
35
|
+
default: string | boolean | number;
|
|
36
|
+
description?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface ComponentsObject {
|
|
39
|
+
schemas?: Record<string, SchemaObject | ReferenceObject>;
|
|
40
|
+
responses?: Record<string, ResponseObject | ReferenceObject>;
|
|
41
|
+
parameters?: Record<string, ParameterObject | ReferenceObject>;
|
|
42
|
+
examples?: Record<string, ExampleObject | ReferenceObject>;
|
|
43
|
+
requestBodies?: Record<string, RequestBodyObject | ReferenceObject>;
|
|
44
|
+
headers?: Record<string, HeaderObject | ReferenceObject>;
|
|
45
|
+
securitySchemes?: Record<string, SecuritySchemeObject | ReferenceObject>;
|
|
46
|
+
links?: Record<string, LinkObject | ReferenceObject>;
|
|
47
|
+
callbacks?: Record<string, CallbackObject | ReferenceObject>;
|
|
48
|
+
}
|
|
49
|
+
export type PathsObject = Record<string, PathItemObject>;
|
|
50
|
+
export interface PathItemObject {
|
|
51
|
+
$ref?: string;
|
|
52
|
+
summary?: string;
|
|
53
|
+
description?: string;
|
|
54
|
+
get?: OperationObject;
|
|
55
|
+
search?: OperationObject;
|
|
56
|
+
query?: OperationObject;
|
|
57
|
+
put?: OperationObject;
|
|
58
|
+
post?: OperationObject;
|
|
59
|
+
delete?: OperationObject;
|
|
60
|
+
options?: OperationObject;
|
|
61
|
+
head?: OperationObject;
|
|
62
|
+
patch?: OperationObject;
|
|
63
|
+
trace?: OperationObject;
|
|
64
|
+
servers?: ServerObject[];
|
|
65
|
+
parameters?: (ParameterObject | ReferenceObject)[];
|
|
66
|
+
}
|
|
67
|
+
export interface OperationObject {
|
|
68
|
+
tags?: string[];
|
|
69
|
+
summary?: string;
|
|
70
|
+
description?: string;
|
|
71
|
+
externalDocs?: ExternalDocumentationObject;
|
|
72
|
+
operationId?: string;
|
|
73
|
+
parameters?: (ParameterObject | ReferenceObject)[];
|
|
74
|
+
requestBody?: RequestBodyObject | ReferenceObject;
|
|
75
|
+
responses: ResponsesObject;
|
|
76
|
+
callbacks?: CallbacksObject;
|
|
77
|
+
deprecated?: boolean;
|
|
78
|
+
security?: SecurityRequirementObject[];
|
|
79
|
+
servers?: ServerObject[];
|
|
80
|
+
}
|
|
81
|
+
export interface ExternalDocumentationObject {
|
|
82
|
+
description?: string;
|
|
83
|
+
url: string;
|
|
84
|
+
}
|
|
85
|
+
export type ParameterLocation = 'query' | 'header' | 'path' | 'cookie';
|
|
86
|
+
export type ParameterStyle = 'matrix' | 'label' | 'form' | 'simple' | 'spaceDelimited' | 'pipeDelimited' | 'deepObject';
|
|
87
|
+
export interface BaseParameterObject {
|
|
88
|
+
description?: string;
|
|
89
|
+
required?: boolean;
|
|
90
|
+
deprecated?: boolean;
|
|
91
|
+
allowEmptyValue?: boolean;
|
|
92
|
+
style?: ParameterStyle;
|
|
93
|
+
explode?: boolean;
|
|
94
|
+
allowReserved?: boolean;
|
|
95
|
+
schema?: SchemaObject | ReferenceObject;
|
|
96
|
+
examples?: Record<string, ExampleObject | ReferenceObject>;
|
|
97
|
+
example?: any;
|
|
98
|
+
content?: ContentObject;
|
|
99
|
+
}
|
|
100
|
+
export interface ParameterObject extends BaseParameterObject {
|
|
101
|
+
name: string;
|
|
102
|
+
in: ParameterLocation;
|
|
103
|
+
}
|
|
104
|
+
export interface RequestBodyObject {
|
|
105
|
+
description?: string;
|
|
106
|
+
content: ContentObject;
|
|
107
|
+
required?: boolean;
|
|
108
|
+
}
|
|
109
|
+
export type ContentObject = Record<string, MediaTypeObject>;
|
|
110
|
+
export interface MediaTypeObject {
|
|
111
|
+
schema?: SchemaObject | ReferenceObject;
|
|
112
|
+
itemSchema?: SchemaObject | ReferenceObject;
|
|
113
|
+
examples?: ExamplesObject;
|
|
114
|
+
example?: any;
|
|
115
|
+
encoding?: EncodingObject;
|
|
116
|
+
}
|
|
117
|
+
export type EncodingObject = Record<string, EncodingPropertyObject>;
|
|
118
|
+
export interface EncodingPropertyObject {
|
|
119
|
+
contentType?: string;
|
|
120
|
+
headers?: Record<string, HeaderObject | ReferenceObject>;
|
|
121
|
+
style?: string;
|
|
122
|
+
explode?: boolean;
|
|
123
|
+
allowReserved?: boolean;
|
|
124
|
+
}
|
|
125
|
+
export interface ResponsesObject extends Record<string, ResponseObject | ReferenceObject | undefined> {
|
|
126
|
+
default?: ResponseObject | ReferenceObject;
|
|
127
|
+
}
|
|
128
|
+
export interface ResponseObject {
|
|
129
|
+
description: string;
|
|
130
|
+
headers?: HeadersObject;
|
|
131
|
+
content?: ContentObject;
|
|
132
|
+
links?: LinksObject;
|
|
133
|
+
}
|
|
134
|
+
export type CallbacksObject = Record<string, CallbackObject | ReferenceObject>;
|
|
135
|
+
export type CallbackObject = Record<string, PathItemObject>;
|
|
136
|
+
export type HeadersObject = Record<string, HeaderObject | ReferenceObject>;
|
|
137
|
+
export interface ExampleObject {
|
|
138
|
+
summary?: string;
|
|
139
|
+
description?: string;
|
|
140
|
+
value?: any;
|
|
141
|
+
externalValue?: string;
|
|
142
|
+
}
|
|
143
|
+
export type LinksObject = Record<string, LinkObject | ReferenceObject>;
|
|
144
|
+
export interface LinkObject {
|
|
145
|
+
operationRef?: string;
|
|
146
|
+
operationId?: string;
|
|
147
|
+
parameters?: LinkParametersObject;
|
|
148
|
+
requestBody?: unknown;
|
|
149
|
+
description?: string;
|
|
150
|
+
server?: ServerObject;
|
|
151
|
+
}
|
|
152
|
+
export type LinkParametersObject = Record<string, unknown>;
|
|
153
|
+
export type HeaderObject = BaseParameterObject;
|
|
154
|
+
export interface TagObject {
|
|
155
|
+
name: string;
|
|
156
|
+
summary?: string;
|
|
157
|
+
description?: string;
|
|
158
|
+
externalDocs?: ExternalDocumentationObject;
|
|
159
|
+
parent?: string;
|
|
160
|
+
kind?: 'audience' | 'badge' | 'nav' | (string & {});
|
|
161
|
+
}
|
|
162
|
+
export type ExamplesObject = Record<string, ExampleObject | ReferenceObject>;
|
|
163
|
+
export interface ReferenceObject {
|
|
164
|
+
$ref: string;
|
|
165
|
+
}
|
|
166
|
+
export interface SchemaObject {
|
|
167
|
+
nullable?: boolean;
|
|
168
|
+
discriminator?: DiscriminatorObject;
|
|
169
|
+
readOnly?: boolean;
|
|
170
|
+
writeOnly?: boolean;
|
|
171
|
+
xml?: XmlObject;
|
|
172
|
+
externalDocs?: ExternalDocumentationObject;
|
|
173
|
+
example?: any;
|
|
174
|
+
examples?: any[] | Record<string, any>;
|
|
175
|
+
deprecated?: boolean;
|
|
176
|
+
type?: string;
|
|
177
|
+
allOf?: (SchemaObject | ReferenceObject)[];
|
|
178
|
+
oneOf?: (SchemaObject | ReferenceObject)[];
|
|
179
|
+
anyOf?: (SchemaObject | ReferenceObject)[];
|
|
180
|
+
not?: SchemaObject | ReferenceObject;
|
|
181
|
+
items?: SchemaObject | ReferenceObject;
|
|
182
|
+
properties?: Record<string, SchemaObject | ReferenceObject>;
|
|
183
|
+
additionalProperties?: SchemaObject | ReferenceObject | boolean;
|
|
184
|
+
patternProperties?: Record<string, SchemaObject | ReferenceObject> | undefined;
|
|
185
|
+
description?: string;
|
|
186
|
+
format?: string;
|
|
187
|
+
default?: any;
|
|
188
|
+
title?: string;
|
|
189
|
+
multipleOf?: number;
|
|
190
|
+
maximum?: number;
|
|
191
|
+
exclusiveMaximum?: boolean;
|
|
192
|
+
minimum?: number;
|
|
193
|
+
exclusiveMinimum?: boolean;
|
|
194
|
+
maxLength?: number;
|
|
195
|
+
minLength?: number;
|
|
196
|
+
pattern?: string;
|
|
197
|
+
maxItems?: number;
|
|
198
|
+
minItems?: number;
|
|
199
|
+
uniqueItems?: boolean;
|
|
200
|
+
maxProperties?: number;
|
|
201
|
+
minProperties?: number;
|
|
202
|
+
required?: string[];
|
|
203
|
+
enum?: any[];
|
|
204
|
+
'x-enumNames'?: string[];
|
|
205
|
+
}
|
|
206
|
+
export type SchemasObject = Record<string, SchemaObject>;
|
|
207
|
+
export interface DiscriminatorObject {
|
|
208
|
+
propertyName: string;
|
|
209
|
+
mapping?: Record<string, string>;
|
|
210
|
+
}
|
|
211
|
+
export interface XmlObject {
|
|
212
|
+
name?: string;
|
|
213
|
+
namespace?: string;
|
|
214
|
+
prefix?: string;
|
|
215
|
+
attribute?: boolean;
|
|
216
|
+
wrapped?: boolean;
|
|
217
|
+
}
|
|
218
|
+
export type SecuritySchemeType = 'apiKey' | 'http' | 'oauth2' | 'openIdConnect';
|
|
219
|
+
export interface SecuritySchemeObject {
|
|
220
|
+
type: SecuritySchemeType;
|
|
221
|
+
description?: string;
|
|
222
|
+
name?: string;
|
|
223
|
+
in?: string;
|
|
224
|
+
scheme?: string;
|
|
225
|
+
bearerFormat?: string;
|
|
226
|
+
flows?: OAuthFlowsObject;
|
|
227
|
+
openIdConnectUrl?: string;
|
|
228
|
+
'x-tokenName'?: string;
|
|
229
|
+
[extension: `x-${string}`]: any;
|
|
230
|
+
}
|
|
231
|
+
export interface OAuthFlowsObject {
|
|
232
|
+
implicit?: OAuthFlowObject;
|
|
233
|
+
password?: OAuthFlowObject;
|
|
234
|
+
clientCredentials?: OAuthFlowObject;
|
|
235
|
+
authorizationCode?: OAuthFlowObject;
|
|
236
|
+
deviceAuthorization?: OAuthDeviceAuthorizationFlowObject;
|
|
237
|
+
}
|
|
238
|
+
export interface OAuthFlowObject {
|
|
239
|
+
authorizationUrl?: string;
|
|
240
|
+
tokenUrl?: string;
|
|
241
|
+
refreshUrl?: string;
|
|
242
|
+
scopes: ScopesObject;
|
|
243
|
+
}
|
|
244
|
+
export interface OAuthDeviceAuthorizationFlowObject {
|
|
245
|
+
deviceAuthorizationUrl: string;
|
|
246
|
+
tokenUrl: string;
|
|
247
|
+
refreshUrl?: string;
|
|
248
|
+
scopes: ScopesObject;
|
|
249
|
+
}
|
|
250
|
+
export type ScopesObject = Record<string, any>;
|
|
251
|
+
export type SecurityRequirementObject = Record<string, string[]>;
|
|
252
|
+
export type ExtensionLocation = 'root' | 'info';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Type } from '@nestjs/common';
|
|
2
|
+
import { EnumSchemaAttributes } from './enum-schema-attributes.interface';
|
|
3
|
+
import { ReferenceObject, SchemaObject } from './open-api-spec.interface';
|
|
4
|
+
export type EnumAllowedTypes = any[] | Record<string, any> | (() => any[] | Record<string, any>);
|
|
5
|
+
interface SchemaObjectCommonMetadata extends Omit<SchemaObject, 'type' | 'required' | 'properties' | 'enum'> {
|
|
6
|
+
isArray?: boolean;
|
|
7
|
+
name?: string;
|
|
8
|
+
enum?: EnumAllowedTypes;
|
|
9
|
+
}
|
|
10
|
+
export type SchemaObjectMetadata = (SchemaObjectCommonMetadata & {
|
|
11
|
+
type?: Type<unknown> | Function | [Function] | 'array' | 'string' | 'number' | 'boolean' | 'integer' | 'null';
|
|
12
|
+
required?: boolean;
|
|
13
|
+
}) | ({
|
|
14
|
+
type?: Type<unknown> | Function | [Function] | Record<string, any>;
|
|
15
|
+
required?: boolean;
|
|
16
|
+
enumName: string;
|
|
17
|
+
enumSchema?: EnumSchemaAttributes;
|
|
18
|
+
} & SchemaObjectCommonMetadata) | ({
|
|
19
|
+
type: 'object';
|
|
20
|
+
properties: Record<string, SchemaObjectMetadata>;
|
|
21
|
+
required?: string[];
|
|
22
|
+
selfRequired?: boolean;
|
|
23
|
+
} & SchemaObjectCommonMetadata) | ({
|
|
24
|
+
type: 'object';
|
|
25
|
+
properties?: Record<string, SchemaObjectMetadata>;
|
|
26
|
+
additionalProperties: SchemaObject | ReferenceObject | boolean;
|
|
27
|
+
required?: string[];
|
|
28
|
+
selfRequired?: boolean;
|
|
29
|
+
} & SchemaObjectCommonMetadata);
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { OpenAPIObject } from './open-api-spec.interface';
|
|
2
|
+
import { SwaggerUiOptions } from './swagger-ui-options.interface';
|
|
3
|
+
export interface SwaggerCustomOptions {
|
|
4
|
+
useGlobalPrefix?: boolean;
|
|
5
|
+
swaggerUiEnabled?: boolean;
|
|
6
|
+
ui?: boolean;
|
|
7
|
+
raw?: boolean | Array<'json' | 'yaml'>;
|
|
8
|
+
swaggerUrl?: string;
|
|
9
|
+
jsonDocumentUrl?: string;
|
|
10
|
+
yamlDocumentUrl?: string;
|
|
11
|
+
patchDocumentOnRequest?: <TRequest = any, TResponse = any>(req: TRequest, res: TResponse, document: OpenAPIObject) => OpenAPIObject;
|
|
12
|
+
explorer?: boolean;
|
|
13
|
+
swaggerOptions?: SwaggerUiOptions;
|
|
14
|
+
customCss?: string;
|
|
15
|
+
customCssUrl?: string | string[];
|
|
16
|
+
customJs?: string | string[];
|
|
17
|
+
customJsStr?: string | string[];
|
|
18
|
+
customfavIcon?: string;
|
|
19
|
+
customSiteTitle?: string;
|
|
20
|
+
customSwaggerUiPath?: string;
|
|
21
|
+
validatorUrl?: string;
|
|
22
|
+
url?: string;
|
|
23
|
+
urls?: Record<'url' | 'name', string>[];
|
|
24
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type OperationIdFactory = (controllerKey: string, methodKey: string, version?: string) => string;
|
|
2
|
+
export interface SwaggerDocumentOptions {
|
|
3
|
+
include?: Function[];
|
|
4
|
+
extraModels?: Function[];
|
|
5
|
+
ignoreGlobalPrefix?: boolean;
|
|
6
|
+
deepScanRoutes?: boolean;
|
|
7
|
+
operationIdFactory?: OperationIdFactory;
|
|
8
|
+
linkNameFactory?: (controllerKey: string, methodKey: string, fieldKey: string) => string;
|
|
9
|
+
autoTagControllers?: boolean;
|
|
10
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface SwaggerUiOptions {
|
|
2
|
+
initOAuth?: {
|
|
3
|
+
clientId?: string;
|
|
4
|
+
clientSecret?: string;
|
|
5
|
+
realm?: string;
|
|
6
|
+
appName?: string;
|
|
7
|
+
scopeSeparator?: string;
|
|
8
|
+
scopes?: string[];
|
|
9
|
+
additionalQueryStringParams?: Record<string, string>;
|
|
10
|
+
useBasicAuthenticationWithAccessCodeGrant?: boolean;
|
|
11
|
+
usePkceWithAuthorizationCodeGrant?: boolean;
|
|
12
|
+
};
|
|
13
|
+
persistAuthorization?: boolean;
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.before = void 0;
|
|
4
|
+
const merge_options_1 = require("./merge-options");
|
|
5
|
+
const plugin_debug_logger_1 = require("./plugin-debug-logger");
|
|
6
|
+
const is_filename_matched_util_1 = require("./utils/is-filename-matched.util");
|
|
7
|
+
const controller_class_visitor_1 = require("./visitors/controller-class.visitor");
|
|
8
|
+
const model_class_visitor_1 = require("./visitors/model-class.visitor");
|
|
9
|
+
const modelClassVisitor = new model_class_visitor_1.ModelClassVisitor();
|
|
10
|
+
const controllerClassVisitor = new controller_class_visitor_1.ControllerClassVisitor();
|
|
11
|
+
const before = (options, program) => {
|
|
12
|
+
options = (0, merge_options_1.mergePluginOptions)(options);
|
|
13
|
+
if (!program) {
|
|
14
|
+
const error = `The "program" reference must be provided when using the CLI Plugin. This error is likely caused by the "isolatedModules" compiler option being set to "true".`;
|
|
15
|
+
plugin_debug_logger_1.pluginDebugLogger.debug(error);
|
|
16
|
+
throw new Error(error);
|
|
17
|
+
}
|
|
18
|
+
return (ctx) => {
|
|
19
|
+
return (sf) => {
|
|
20
|
+
if ((0, is_filename_matched_util_1.isFilenameMatched)(options.dtoFileNameSuffix, sf.fileName)) {
|
|
21
|
+
return modelClassVisitor.visit(sf, ctx, program, options);
|
|
22
|
+
}
|
|
23
|
+
if ((0, is_filename_matched_util_1.isFilenameMatched)(options.controllerFileNameSuffix, sf.fileName)) {
|
|
24
|
+
return controllerClassVisitor.visit(sf, ctx, program, options);
|
|
25
|
+
}
|
|
26
|
+
return sf;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
exports.before = before;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./compiler-plugin"), exports);
|
|
18
|
+
__exportStar(require("./visitors/readonly.visitor"), exports);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface PluginOptions {
|
|
2
|
+
dtoFileNameSuffix?: string | string[];
|
|
3
|
+
controllerFileNameSuffix?: string | string[];
|
|
4
|
+
classValidatorShim?: boolean;
|
|
5
|
+
classTransformerShim?: boolean | 'exclusive';
|
|
6
|
+
dtoKeyOfComment?: string;
|
|
7
|
+
controllerKeyOfComment?: string;
|
|
8
|
+
introspectComments?: boolean;
|
|
9
|
+
esmCompatible?: boolean;
|
|
10
|
+
readonly?: boolean;
|
|
11
|
+
pathToSource?: string;
|
|
12
|
+
debug?: boolean;
|
|
13
|
+
parameterProperties?: boolean;
|
|
14
|
+
skipAutoHttpCode?: boolean;
|
|
15
|
+
skipDefaultValues?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const mergePluginOptions: (options?: Record<string, any>) => PluginOptions;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mergePluginOptions = void 0;
|
|
4
|
+
const shared_utils_1 = require("@nestjs/common/utils/shared.utils");
|
|
5
|
+
const plugin_debug_logger_1 = require("./plugin-debug-logger");
|
|
6
|
+
const defaultOptions = {
|
|
7
|
+
dtoFileNameSuffix: ['.dto.ts', '.entity.ts'],
|
|
8
|
+
controllerFileNameSuffix: ['.controller.ts'],
|
|
9
|
+
classValidatorShim: true,
|
|
10
|
+
classTransformerShim: false,
|
|
11
|
+
dtoKeyOfComment: 'description',
|
|
12
|
+
controllerKeyOfComment: 'summary',
|
|
13
|
+
introspectComments: false,
|
|
14
|
+
esmCompatible: false,
|
|
15
|
+
readonly: false,
|
|
16
|
+
debug: false,
|
|
17
|
+
skipDefaultValues: false
|
|
18
|
+
};
|
|
19
|
+
const mergePluginOptions = (options = {}) => {
|
|
20
|
+
if ((0, shared_utils_1.isString)(options.dtoFileNameSuffix)) {
|
|
21
|
+
options.dtoFileNameSuffix = [options.dtoFileNameSuffix];
|
|
22
|
+
}
|
|
23
|
+
if ((0, shared_utils_1.isString)(options.controllerFileNameSuffix)) {
|
|
24
|
+
options.controllerFileNameSuffix = [options.controllerFileNameSuffix];
|
|
25
|
+
}
|
|
26
|
+
for (const key of ['dtoFileNameSuffix', 'controllerFileNameSuffix']) {
|
|
27
|
+
if (options[key] && options[key].includes('.ts')) {
|
|
28
|
+
plugin_debug_logger_1.pluginDebugLogger.warn(`Skipping ${key} option ".ts" because it can cause unwanted behaviour.`);
|
|
29
|
+
options[key] = options[key].filter((pattern) => pattern !== '.ts');
|
|
30
|
+
if (options[key].length == 0) {
|
|
31
|
+
delete options[key];
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return Object.assign(Object.assign({}, defaultOptions), options);
|
|
36
|
+
};
|
|
37
|
+
exports.mergePluginOptions = mergePluginOptions;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.MetadataLoader = void 0;
|
|
13
|
+
const plugin_constants_1 = require("./plugin-constants");
|
|
14
|
+
class MetadataLoader {
|
|
15
|
+
static addRefreshHook(hook) {
|
|
16
|
+
return MetadataLoader.refreshHooks.push(hook);
|
|
17
|
+
}
|
|
18
|
+
load(metadata) {
|
|
19
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
20
|
+
const pkgMetadata = metadata['@nestjs/swagger'];
|
|
21
|
+
if (!pkgMetadata) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const { models, controllers } = pkgMetadata;
|
|
25
|
+
if (models) {
|
|
26
|
+
yield this.applyMetadata(models);
|
|
27
|
+
}
|
|
28
|
+
if (controllers) {
|
|
29
|
+
yield this.applyMetadata(controllers);
|
|
30
|
+
}
|
|
31
|
+
this.runHooks();
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
applyMetadata(meta) {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
const loadPromises = meta.map((_a) => __awaiter(this, [_a], void 0, function* ([fileImport, fileMeta]) {
|
|
37
|
+
const fileRef = yield fileImport;
|
|
38
|
+
Object.keys(fileMeta).map((key) => {
|
|
39
|
+
const clsRef = fileRef[key];
|
|
40
|
+
clsRef[plugin_constants_1.METADATA_FACTORY_NAME] = () => fileMeta[key];
|
|
41
|
+
});
|
|
42
|
+
}));
|
|
43
|
+
yield Promise.all(loadPromises);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
runHooks() {
|
|
47
|
+
MetadataLoader.refreshHooks.forEach((hook) => hook());
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.MetadataLoader = MetadataLoader;
|
|
51
|
+
MetadataLoader.refreshHooks = new Array();
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.METADATA_FACTORY_NAME = exports.OPENAPI_PACKAGE_NAME = exports.OPENAPI_NAMESPACE = void 0;
|
|
4
|
+
exports.OPENAPI_NAMESPACE = 'openapi';
|
|
5
|
+
exports.OPENAPI_PACKAGE_NAME = '@nestjs/swagger';
|
|
6
|
+
exports.METADATA_FACTORY_NAME = '_OPENAPI_METADATA_FACTORY';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.pluginDebugLogger = void 0;
|
|
4
|
+
const common_1 = require("@nestjs/common");
|
|
5
|
+
class PluginDebugLogger extends common_1.ConsoleLogger {
|
|
6
|
+
}
|
|
7
|
+
exports.pluginDebugLogger = new PluginDebugLogger('CLI Plugin');
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { DocComment, DocNode } from '@microsoft/tsdoc';
|
|
2
|
+
import * as ts from 'typescript';
|
|
3
|
+
import { Decorator, Node, ObjectFlags, Type, TypeChecker, TypeFlags, TypeFormatFlags, UnionTypeNode } from 'typescript';
|
|
4
|
+
export declare function renderDocNode(docNode: DocNode): string;
|
|
5
|
+
export declare function isArray(type: Type): boolean;
|
|
6
|
+
export declare function getTypeArguments(type: Type): any;
|
|
7
|
+
export declare function isBoolean(type: Type): boolean;
|
|
8
|
+
export declare function isString(type: Type): boolean;
|
|
9
|
+
export declare function isStringLiteral(type: Type): boolean;
|
|
10
|
+
export declare function isStringMapping(type: Type): boolean;
|
|
11
|
+
export declare function isNumber(type: Type): boolean;
|
|
12
|
+
export declare function isBigInt(type: Type): boolean;
|
|
13
|
+
export declare function isInterface(type: Type): boolean;
|
|
14
|
+
export declare function isEnum(type: Type): boolean;
|
|
15
|
+
export declare function isEnumLiteral(type: Type): boolean;
|
|
16
|
+
export declare function hasFlag(type: Type, flag: TypeFlags): boolean;
|
|
17
|
+
export declare function hasObjectFlag(type: Type, flag: ObjectFlags): boolean;
|
|
18
|
+
export declare function getText(type: Type, typeChecker: TypeChecker, enclosingNode?: Node, typeFormatFlags?: TypeFormatFlags): string;
|
|
19
|
+
export declare function getDefaultTypeFormatFlags(enclosingNode: Node): number;
|
|
20
|
+
export declare function getDocComment(node: Node): DocComment;
|
|
21
|
+
export declare function getMainCommentOfNode(node: Node): string;
|
|
22
|
+
export declare function parseCommentDocValue(docValue: string, type: ts.Type): string;
|
|
23
|
+
export declare function getTsDocTagsOfNode(node: Node, typeChecker: TypeChecker): any;
|
|
24
|
+
export declare function getTsDocErrorsOfNode(node: Node): any[];
|
|
25
|
+
export declare function getDecoratorArguments(decorator: Decorator): any[] | ts.NodeArray<ts.Expression>;
|
|
26
|
+
export declare function getDecoratorName(decorator: Decorator): string;
|
|
27
|
+
export declare function findNullableTypeFromUnion(typeNode: UnionTypeNode, typeChecker: TypeChecker): ts.TypeNode;
|
|
28
|
+
export declare function createBooleanLiteral(factory: ts.NodeFactory, flag: boolean): ts.BooleanLiteral;
|
|
29
|
+
export declare function createPrimitiveLiteral(factory: ts.NodeFactory, item: unknown, typeOfItem?: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"): ts.StringLiteral | ts.NumericLiteral | ts.PrefixUnaryExpression | ts.BooleanLiteral;
|
|
30
|
+
export declare function createLiteralFromAnyValue(factory: ts.NodeFactory, item: unknown): any;
|