@kubb/ast 5.13.1 → 5.14.1
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/dist/index.cjs +569 -385
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +111 -4
- package/dist/index.d.ts +111 -4
- package/dist/index.js +567 -386
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
//#endregion
|
|
2
2
|
//#region src/constants.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Node kind discriminators used by every AST node (for example `node.kind === nodeKinds.text`).
|
|
5
|
+
*/
|
|
6
|
+
export declare const nodeKinds: {
|
|
7
|
+
readonly input: 'Input';
|
|
8
|
+
readonly operation: 'Operation';
|
|
9
|
+
readonly schema: 'Schema';
|
|
10
|
+
readonly property: 'Property';
|
|
11
|
+
readonly parameter: 'Parameter';
|
|
12
|
+
readonly response: 'Response';
|
|
13
|
+
readonly requestBody: 'RequestBody';
|
|
14
|
+
readonly content: 'Content';
|
|
15
|
+
readonly type: 'Type';
|
|
16
|
+
readonly file: 'File';
|
|
17
|
+
readonly import: 'Import';
|
|
18
|
+
readonly export: 'Export';
|
|
19
|
+
readonly source: 'Source';
|
|
20
|
+
readonly const: 'Const';
|
|
21
|
+
readonly function: 'Function';
|
|
22
|
+
readonly arrowFunction: 'ArrowFunction';
|
|
23
|
+
readonly text: 'Text';
|
|
24
|
+
readonly break: 'Break';
|
|
25
|
+
readonly jsx: 'Jsx';
|
|
26
|
+
};
|
|
3
27
|
/**
|
|
4
28
|
* Traversal depth for AST visitor utilities.
|
|
5
29
|
*
|
|
@@ -903,6 +927,27 @@ type UserParameterNode = Pick<ParameterNode, 'name' | 'in' | 'schema'> & Partial
|
|
|
903
927
|
declare function createParameter(input: UserParameterNode): ParameterNode;
|
|
904
928
|
//#endregion
|
|
905
929
|
//#region src/nodes/content.d.ts
|
|
930
|
+
/**
|
|
931
|
+
* How one body property is serialized, from the `encoding` entry of its media type.
|
|
932
|
+
*/
|
|
933
|
+
type EncodingNode = {
|
|
934
|
+
/**
|
|
935
|
+
* Content type of the part, for example `'application/json'` for a multipart property.
|
|
936
|
+
*/
|
|
937
|
+
contentType?: string;
|
|
938
|
+
/**
|
|
939
|
+
* Serialization style of the property.
|
|
940
|
+
*/
|
|
941
|
+
style?: ParameterStyle;
|
|
942
|
+
/**
|
|
943
|
+
* Whether array and object values expand into separate values.
|
|
944
|
+
*/
|
|
945
|
+
explode?: boolean;
|
|
946
|
+
/**
|
|
947
|
+
* Whether reserved characters are sent as-is instead of percent-encoded.
|
|
948
|
+
*/
|
|
949
|
+
allowReserved?: boolean;
|
|
950
|
+
};
|
|
906
951
|
/**
|
|
907
952
|
* AST node representing one content-type entry of a request body or response.
|
|
908
953
|
*
|
|
@@ -936,6 +981,10 @@ type ContentNode = BaseNode & {
|
|
|
936
981
|
* Set when a referenced schema has `readOnly`/`writeOnly` fields that should be omitted.
|
|
937
982
|
*/
|
|
938
983
|
keysToOmit?: Array<string> | null;
|
|
984
|
+
/**
|
|
985
|
+
* Serialization settings per body property that sets at least one field in the spec's `encoding`.
|
|
986
|
+
*/
|
|
987
|
+
encoding?: Record<string, EncodingNode>;
|
|
939
988
|
};
|
|
940
989
|
/**
|
|
941
990
|
* Creates a `ContentNode` for a single request-body or response content type.
|
|
@@ -1659,6 +1708,13 @@ type SourceNode = BaseNode & {
|
|
|
1659
1708
|
* Include this source in barrel/index file generation.
|
|
1660
1709
|
*/
|
|
1661
1710
|
isIndexable?: boolean | null;
|
|
1711
|
+
/**
|
|
1712
|
+
* Marks the source as a definition that importing files absorb instead of import. `expression` is
|
|
1713
|
+
* the declaration's right-hand side, such as `{ body: Pet }`.
|
|
1714
|
+
*/
|
|
1715
|
+
inline?: {
|
|
1716
|
+
expression: string;
|
|
1717
|
+
} | null;
|
|
1662
1718
|
/**
|
|
1663
1719
|
* Child nodes that make up this source fragment, in DOM order.
|
|
1664
1720
|
* Use a {@link TextNode} for raw string content.
|
|
@@ -1974,7 +2030,7 @@ declare namespace index_d_exports$1 {
|
|
|
1974
2030
|
* ```ts
|
|
1975
2031
|
* function getKind(node: Node): string {
|
|
1976
2032
|
* switch (node.kind) {
|
|
1977
|
-
* case
|
|
2033
|
+
* case nodeKinds.input:
|
|
1978
2034
|
* return 'input'
|
|
1979
2035
|
* default:
|
|
1980
2036
|
* return 'other'
|
|
@@ -2499,8 +2555,59 @@ export declare function createPrinter<T extends PrinterFactoryOptions = PrinterF
|
|
|
2499
2555
|
*/
|
|
2500
2556
|
export declare function extractStringsFromNodes(nodes: Array<CodeNode> | undefined): string;
|
|
2501
2557
|
//#endregion
|
|
2558
|
+
//#region src/utils/inline.d.ts
|
|
2559
|
+
/**
|
|
2560
|
+
* Whether every source of `file` is inline. Other files absorb such a file, so it is never written.
|
|
2561
|
+
*/
|
|
2562
|
+
export declare function isVirtualFile(file: FileNode): boolean;
|
|
2563
|
+
type InlineFilesResult = {
|
|
2564
|
+
/**
|
|
2565
|
+
* Files that imported an inline name, rewritten to hold its definition.
|
|
2566
|
+
*/
|
|
2567
|
+
files: Array<FileNode>;
|
|
2568
|
+
/**
|
|
2569
|
+
* Paths of the virtual files, which are not written.
|
|
2570
|
+
*/
|
|
2571
|
+
virtualPaths: Array<string>;
|
|
2572
|
+
/**
|
|
2573
|
+
* One message per name that could not be inlined.
|
|
2574
|
+
*/
|
|
2575
|
+
problems: Array<{
|
|
2576
|
+
path: string;
|
|
2577
|
+
message: string;
|
|
2578
|
+
}>;
|
|
2579
|
+
};
|
|
2580
|
+
/**
|
|
2581
|
+
* The language-specific half of {@link inlineFiles}, supplied by the parser that prints the file.
|
|
2582
|
+
*/
|
|
2583
|
+
type InlineLanguage = {
|
|
2584
|
+
/**
|
|
2585
|
+
* Swaps in what `replace` returns for every identifier in `text` that references a name, skipping strings and comments.
|
|
2586
|
+
*/
|
|
2587
|
+
replaceIdentifiers(text: string, replace: (name: string) => string | undefined): string;
|
|
2588
|
+
/**
|
|
2589
|
+
* Makes `expression` safe to put where a name was, such as `(A | B)` in TypeScript.
|
|
2590
|
+
*/
|
|
2591
|
+
wrap(expression: string): string;
|
|
2592
|
+
};
|
|
2593
|
+
type InlineFilesOptions = {
|
|
2594
|
+
/**
|
|
2595
|
+
* The inline support for a file's language, or `undefined` when it has none.
|
|
2596
|
+
*/
|
|
2597
|
+
language: (file: FileNode) => InlineLanguage | undefined;
|
|
2598
|
+
};
|
|
2599
|
+
/**
|
|
2600
|
+
* Replaces every name a file imports from a virtual file (see {@link isVirtualFile}) with that name's
|
|
2601
|
+
* `inline.expression`, until no inline names are left. The definitions' own imports move to the importing file.
|
|
2602
|
+
*/
|
|
2603
|
+
export declare function inlineFiles(files: ReadonlyArray<FileNode>, { language }: InlineFilesOptions): InlineFilesResult;
|
|
2604
|
+
//#endregion
|
|
2502
2605
|
//#region src/utils/refs.d.ts
|
|
2503
|
-
/**
|
|
2606
|
+
/**
|
|
2607
|
+
* Returns the last segment of a `$ref` pointer, for example `'Pet'` for `#/components/schemas/Pet`.
|
|
2608
|
+
* The segment is decoded like the pointer resolver does: percent-escapes first, then `~1` and `~0`
|
|
2609
|
+
* (RFC 6901), so `a~1b~0c` names the component `a/b~c`.
|
|
2610
|
+
*/
|
|
2504
2611
|
export declare function refName(ref: string): string;
|
|
2505
2612
|
/**
|
|
2506
2613
|
* Resolves the emitted name of the schema a ref node points at. Prefers `targetName` (set when
|
|
@@ -2750,8 +2857,8 @@ type ParserOptions = {
|
|
|
2750
2857
|
enumSuffix: 'enum' | (string & {});
|
|
2751
2858
|
};
|
|
2752
2859
|
declare namespace index_d_exports {
|
|
2753
|
-
export { ArraySchemaNode, ArrowFunctionNode, BreakNode, CodeNode, ConstNode, ContentNode, DateOnlyTypeValue, DateSchemaNode, DateTimeTypeValue, DateTypeOptions, DatetimeSchemaNode, DistributiveOmit, Enforce, EnumSchemaNode, ExportNode, FileNode, FunctionNode, GenericOperationNode, HttpMethod, HttpOperationNode, ImportNode, InputMeta, InputNode, InputSecurityScheme, InputServer, IntersectionSchemaNode, JSDocNode, JsxNode, Macro, Node, NodeKind, NotSchemaNode, NumberSchemaNode, ObjectSchemaNode, OperationNode, ParameterLocation, ParameterNode, ParameterStyle, ParentOf, ParserOptions, PrimitiveSchemaType, Printer, PrinterFactoryOptions, PrinterPartial, PropertyNode, RefSchemaNode, RequestBodyNode, ResponseNode, ScalarSchemaNode, ScalarSchemaType, SchemaNode, SchemaNodeByType, SchemaType, SourceNode, StatusCode, StringSchemaNode, TextNode, TimeSchemaNode, TypeNode, UnionSchemaNode, UrlSchemaNode, UserFileNode, Visitor, VisitorContext, applyMacros, index_d_exports as ast, collect, collectImportedRefNames, collectSchemaRefs, collectSync, collectUsedSchemaNames, composeMacros, createPrinter, defineMacro, extractStringsFromNodes, index_d_exports$1 as factory, findCircularSchemas, findCircularSchemasFromGraph, findSchema, forEachChild, forEachSchema, getSchemaLiteralValues, inferDiscriminatorPropertyName, isBareRef, isHttpOperationNode, mergeRefWithSchema, narrowSchema, optionality, refName, resolveRef, resolveRefName, resolveSchemaProperties, schemaTypes, transform };
|
|
2860
|
+
export { ArraySchemaNode, ArrowFunctionNode, BreakNode, CodeNode, ConstNode, ContentNode, DateOnlyTypeValue, DateSchemaNode, DateTimeTypeValue, DateTypeOptions, DatetimeSchemaNode, DistributiveOmit, EncodingNode, Enforce, EnumSchemaNode, ExportNode, FileNode, FunctionNode, GenericOperationNode, HttpMethod, HttpOperationNode, ImportNode, InlineLanguage, InputMeta, InputNode, InputSecurityScheme, InputServer, IntersectionSchemaNode, JSDocNode, JsxNode, Macro, Node, NodeKind, NotSchemaNode, NumberSchemaNode, ObjectSchemaNode, OperationNode, ParameterLocation, ParameterNode, ParameterStyle, ParentOf, ParserOptions, PrimitiveSchemaType, Printer, PrinterFactoryOptions, PrinterPartial, PropertyNode, RefSchemaNode, RequestBodyNode, ResponseNode, ScalarSchemaNode, ScalarSchemaType, SchemaNode, SchemaNodeByType, SchemaType, SourceNode, StatusCode, StringSchemaNode, TextNode, TimeSchemaNode, TypeNode, UnionSchemaNode, UrlSchemaNode, UserFileNode, Visitor, VisitorContext, applyMacros, index_d_exports as ast, collect, collectImportedRefNames, collectSchemaRefs, collectSync, collectUsedSchemaNames, composeMacros, createPrinter, defineMacro, extractStringsFromNodes, index_d_exports$1 as factory, findCircularSchemas, findCircularSchemasFromGraph, findSchema, forEachChild, forEachSchema, getSchemaLiteralValues, inferDiscriminatorPropertyName, inlineFiles, isBareRef, isHttpOperationNode, isVirtualFile, mergeRefWithSchema, narrowSchema, nodeKinds, optionality, refName, resolveRef, resolveRefName, resolveSchemaProperties, schemaTypes, transform };
|
|
2754
2861
|
}
|
|
2755
2862
|
//#endregion
|
|
2756
|
-
export { type ArraySchemaNode, type ArrowFunctionNode, type BreakNode, type CodeNode, type ConstNode, type ContentNode, type DateOnlyTypeValue, type DateSchemaNode, type DateTimeTypeValue, type DateTypeOptions, type DatetimeSchemaNode, type DistributiveOmit, type Enforce, type EnumSchemaNode, type ExportNode, type FileNode, type FunctionNode, type GenericOperationNode, type HttpMethod, type HttpOperationNode, type ImportNode, type InputMeta, type InputNode, type InputSecurityScheme, type InputServer, type IntersectionSchemaNode, type JSDocNode, type JsxNode, type Macro, type Node, type NodeKind, type NotSchemaNode, type NumberSchemaNode, type ObjectSchemaNode, type OperationNode, type ParameterLocation, type ParameterNode, type ParameterStyle, type ParentOf, type ParserOptions, type PrimitiveSchemaType, type Printer, type PrinterFactoryOptions, type PrinterPartial, type PropertyNode, type RefSchemaNode, type RequestBodyNode, type ResponseNode, type ScalarSchemaNode, type ScalarSchemaType, type SchemaNode, type SchemaNodeByType, type SchemaType, type SourceNode, type StatusCode, type StringSchemaNode, type TextNode, type TimeSchemaNode, type TypeNode, type UnionSchemaNode, type UrlSchemaNode, type UserFileNode, type Visitor, type VisitorContext, index_d_exports as ast, index_d_exports$1 as factory };
|
|
2863
|
+
export { type ArraySchemaNode, type ArrowFunctionNode, type BreakNode, type CodeNode, type ConstNode, type ContentNode, type DateOnlyTypeValue, type DateSchemaNode, type DateTimeTypeValue, type DateTypeOptions, type DatetimeSchemaNode, type DistributiveOmit, type EncodingNode, type Enforce, type EnumSchemaNode, type ExportNode, type FileNode, type FunctionNode, type GenericOperationNode, type HttpMethod, type HttpOperationNode, type ImportNode, type InlineLanguage, type InputMeta, type InputNode, type InputSecurityScheme, type InputServer, type IntersectionSchemaNode, type JSDocNode, type JsxNode, type Macro, type Node, type NodeKind, type NotSchemaNode, type NumberSchemaNode, type ObjectSchemaNode, type OperationNode, type ParameterLocation, type ParameterNode, type ParameterStyle, type ParentOf, type ParserOptions, type PrimitiveSchemaType, type Printer, type PrinterFactoryOptions, type PrinterPartial, type PropertyNode, type RefSchemaNode, type RequestBodyNode, type ResponseNode, type ScalarSchemaNode, type ScalarSchemaType, type SchemaNode, type SchemaNodeByType, type SchemaType, type SourceNode, type StatusCode, type StringSchemaNode, type TextNode, type TimeSchemaNode, type TypeNode, type UnionSchemaNode, type UrlSchemaNode, type UserFileNode, type Visitor, type VisitorContext, index_d_exports as ast, index_d_exports$1 as factory };
|
|
2757
2864
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
//#endregion
|
|
2
2
|
//#region src/constants.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Node kind discriminators used by every AST node (for example `node.kind === nodeKinds.text`).
|
|
5
|
+
*/
|
|
6
|
+
export declare const nodeKinds: {
|
|
7
|
+
readonly input: 'Input';
|
|
8
|
+
readonly operation: 'Operation';
|
|
9
|
+
readonly schema: 'Schema';
|
|
10
|
+
readonly property: 'Property';
|
|
11
|
+
readonly parameter: 'Parameter';
|
|
12
|
+
readonly response: 'Response';
|
|
13
|
+
readonly requestBody: 'RequestBody';
|
|
14
|
+
readonly content: 'Content';
|
|
15
|
+
readonly type: 'Type';
|
|
16
|
+
readonly file: 'File';
|
|
17
|
+
readonly import: 'Import';
|
|
18
|
+
readonly export: 'Export';
|
|
19
|
+
readonly source: 'Source';
|
|
20
|
+
readonly const: 'Const';
|
|
21
|
+
readonly function: 'Function';
|
|
22
|
+
readonly arrowFunction: 'ArrowFunction';
|
|
23
|
+
readonly text: 'Text';
|
|
24
|
+
readonly break: 'Break';
|
|
25
|
+
readonly jsx: 'Jsx';
|
|
26
|
+
};
|
|
3
27
|
/**
|
|
4
28
|
* Traversal depth for AST visitor utilities.
|
|
5
29
|
*
|
|
@@ -903,6 +927,27 @@ type UserParameterNode = Pick<ParameterNode, 'name' | 'in' | 'schema'> & Partial
|
|
|
903
927
|
declare function createParameter(input: UserParameterNode): ParameterNode;
|
|
904
928
|
//#endregion
|
|
905
929
|
//#region src/nodes/content.d.ts
|
|
930
|
+
/**
|
|
931
|
+
* How one body property is serialized, from the `encoding` entry of its media type.
|
|
932
|
+
*/
|
|
933
|
+
type EncodingNode = {
|
|
934
|
+
/**
|
|
935
|
+
* Content type of the part, for example `'application/json'` for a multipart property.
|
|
936
|
+
*/
|
|
937
|
+
contentType?: string;
|
|
938
|
+
/**
|
|
939
|
+
* Serialization style of the property.
|
|
940
|
+
*/
|
|
941
|
+
style?: ParameterStyle;
|
|
942
|
+
/**
|
|
943
|
+
* Whether array and object values expand into separate values.
|
|
944
|
+
*/
|
|
945
|
+
explode?: boolean;
|
|
946
|
+
/**
|
|
947
|
+
* Whether reserved characters are sent as-is instead of percent-encoded.
|
|
948
|
+
*/
|
|
949
|
+
allowReserved?: boolean;
|
|
950
|
+
};
|
|
906
951
|
/**
|
|
907
952
|
* AST node representing one content-type entry of a request body or response.
|
|
908
953
|
*
|
|
@@ -936,6 +981,10 @@ type ContentNode = BaseNode & {
|
|
|
936
981
|
* Set when a referenced schema has `readOnly`/`writeOnly` fields that should be omitted.
|
|
937
982
|
*/
|
|
938
983
|
keysToOmit?: Array<string> | null;
|
|
984
|
+
/**
|
|
985
|
+
* Serialization settings per body property that sets at least one field in the spec's `encoding`.
|
|
986
|
+
*/
|
|
987
|
+
encoding?: Record<string, EncodingNode>;
|
|
939
988
|
};
|
|
940
989
|
/**
|
|
941
990
|
* Creates a `ContentNode` for a single request-body or response content type.
|
|
@@ -1659,6 +1708,13 @@ type SourceNode = BaseNode & {
|
|
|
1659
1708
|
* Include this source in barrel/index file generation.
|
|
1660
1709
|
*/
|
|
1661
1710
|
isIndexable?: boolean | null;
|
|
1711
|
+
/**
|
|
1712
|
+
* Marks the source as a definition that importing files absorb instead of import. `expression` is
|
|
1713
|
+
* the declaration's right-hand side, such as `{ body: Pet }`.
|
|
1714
|
+
*/
|
|
1715
|
+
inline?: {
|
|
1716
|
+
expression: string;
|
|
1717
|
+
} | null;
|
|
1662
1718
|
/**
|
|
1663
1719
|
* Child nodes that make up this source fragment, in DOM order.
|
|
1664
1720
|
* Use a {@link TextNode} for raw string content.
|
|
@@ -1974,7 +2030,7 @@ declare namespace index_d_exports$1 {
|
|
|
1974
2030
|
* ```ts
|
|
1975
2031
|
* function getKind(node: Node): string {
|
|
1976
2032
|
* switch (node.kind) {
|
|
1977
|
-
* case
|
|
2033
|
+
* case nodeKinds.input:
|
|
1978
2034
|
* return 'input'
|
|
1979
2035
|
* default:
|
|
1980
2036
|
* return 'other'
|
|
@@ -2499,8 +2555,59 @@ export declare function createPrinter<T extends PrinterFactoryOptions = PrinterF
|
|
|
2499
2555
|
*/
|
|
2500
2556
|
export declare function extractStringsFromNodes(nodes: Array<CodeNode> | undefined): string;
|
|
2501
2557
|
//#endregion
|
|
2558
|
+
//#region src/utils/inline.d.ts
|
|
2559
|
+
/**
|
|
2560
|
+
* Whether every source of `file` is inline. Other files absorb such a file, so it is never written.
|
|
2561
|
+
*/
|
|
2562
|
+
export declare function isVirtualFile(file: FileNode): boolean;
|
|
2563
|
+
type InlineFilesResult = {
|
|
2564
|
+
/**
|
|
2565
|
+
* Files that imported an inline name, rewritten to hold its definition.
|
|
2566
|
+
*/
|
|
2567
|
+
files: Array<FileNode>;
|
|
2568
|
+
/**
|
|
2569
|
+
* Paths of the virtual files, which are not written.
|
|
2570
|
+
*/
|
|
2571
|
+
virtualPaths: Array<string>;
|
|
2572
|
+
/**
|
|
2573
|
+
* One message per name that could not be inlined.
|
|
2574
|
+
*/
|
|
2575
|
+
problems: Array<{
|
|
2576
|
+
path: string;
|
|
2577
|
+
message: string;
|
|
2578
|
+
}>;
|
|
2579
|
+
};
|
|
2580
|
+
/**
|
|
2581
|
+
* The language-specific half of {@link inlineFiles}, supplied by the parser that prints the file.
|
|
2582
|
+
*/
|
|
2583
|
+
type InlineLanguage = {
|
|
2584
|
+
/**
|
|
2585
|
+
* Swaps in what `replace` returns for every identifier in `text` that references a name, skipping strings and comments.
|
|
2586
|
+
*/
|
|
2587
|
+
replaceIdentifiers(text: string, replace: (name: string) => string | undefined): string;
|
|
2588
|
+
/**
|
|
2589
|
+
* Makes `expression` safe to put where a name was, such as `(A | B)` in TypeScript.
|
|
2590
|
+
*/
|
|
2591
|
+
wrap(expression: string): string;
|
|
2592
|
+
};
|
|
2593
|
+
type InlineFilesOptions = {
|
|
2594
|
+
/**
|
|
2595
|
+
* The inline support for a file's language, or `undefined` when it has none.
|
|
2596
|
+
*/
|
|
2597
|
+
language: (file: FileNode) => InlineLanguage | undefined;
|
|
2598
|
+
};
|
|
2599
|
+
/**
|
|
2600
|
+
* Replaces every name a file imports from a virtual file (see {@link isVirtualFile}) with that name's
|
|
2601
|
+
* `inline.expression`, until no inline names are left. The definitions' own imports move to the importing file.
|
|
2602
|
+
*/
|
|
2603
|
+
export declare function inlineFiles(files: ReadonlyArray<FileNode>, { language }: InlineFilesOptions): InlineFilesResult;
|
|
2604
|
+
//#endregion
|
|
2502
2605
|
//#region src/utils/refs.d.ts
|
|
2503
|
-
/**
|
|
2606
|
+
/**
|
|
2607
|
+
* Returns the last segment of a `$ref` pointer, for example `'Pet'` for `#/components/schemas/Pet`.
|
|
2608
|
+
* The segment is decoded like the pointer resolver does: percent-escapes first, then `~1` and `~0`
|
|
2609
|
+
* (RFC 6901), so `a~1b~0c` names the component `a/b~c`.
|
|
2610
|
+
*/
|
|
2504
2611
|
export declare function refName(ref: string): string;
|
|
2505
2612
|
/**
|
|
2506
2613
|
* Resolves the emitted name of the schema a ref node points at. Prefers `targetName` (set when
|
|
@@ -2750,8 +2857,8 @@ type ParserOptions = {
|
|
|
2750
2857
|
enumSuffix: 'enum' | (string & {});
|
|
2751
2858
|
};
|
|
2752
2859
|
declare namespace index_d_exports {
|
|
2753
|
-
export { ArraySchemaNode, ArrowFunctionNode, BreakNode, CodeNode, ConstNode, ContentNode, DateOnlyTypeValue, DateSchemaNode, DateTimeTypeValue, DateTypeOptions, DatetimeSchemaNode, DistributiveOmit, Enforce, EnumSchemaNode, ExportNode, FileNode, FunctionNode, GenericOperationNode, HttpMethod, HttpOperationNode, ImportNode, InputMeta, InputNode, InputSecurityScheme, InputServer, IntersectionSchemaNode, JSDocNode, JsxNode, Macro, Node, NodeKind, NotSchemaNode, NumberSchemaNode, ObjectSchemaNode, OperationNode, ParameterLocation, ParameterNode, ParameterStyle, ParentOf, ParserOptions, PrimitiveSchemaType, Printer, PrinterFactoryOptions, PrinterPartial, PropertyNode, RefSchemaNode, RequestBodyNode, ResponseNode, ScalarSchemaNode, ScalarSchemaType, SchemaNode, SchemaNodeByType, SchemaType, SourceNode, StatusCode, StringSchemaNode, TextNode, TimeSchemaNode, TypeNode, UnionSchemaNode, UrlSchemaNode, UserFileNode, Visitor, VisitorContext, applyMacros, index_d_exports as ast, collect, collectImportedRefNames, collectSchemaRefs, collectSync, collectUsedSchemaNames, composeMacros, createPrinter, defineMacro, extractStringsFromNodes, index_d_exports$1 as factory, findCircularSchemas, findCircularSchemasFromGraph, findSchema, forEachChild, forEachSchema, getSchemaLiteralValues, inferDiscriminatorPropertyName, isBareRef, isHttpOperationNode, mergeRefWithSchema, narrowSchema, optionality, refName, resolveRef, resolveRefName, resolveSchemaProperties, schemaTypes, transform };
|
|
2860
|
+
export { ArraySchemaNode, ArrowFunctionNode, BreakNode, CodeNode, ConstNode, ContentNode, DateOnlyTypeValue, DateSchemaNode, DateTimeTypeValue, DateTypeOptions, DatetimeSchemaNode, DistributiveOmit, EncodingNode, Enforce, EnumSchemaNode, ExportNode, FileNode, FunctionNode, GenericOperationNode, HttpMethod, HttpOperationNode, ImportNode, InlineLanguage, InputMeta, InputNode, InputSecurityScheme, InputServer, IntersectionSchemaNode, JSDocNode, JsxNode, Macro, Node, NodeKind, NotSchemaNode, NumberSchemaNode, ObjectSchemaNode, OperationNode, ParameterLocation, ParameterNode, ParameterStyle, ParentOf, ParserOptions, PrimitiveSchemaType, Printer, PrinterFactoryOptions, PrinterPartial, PropertyNode, RefSchemaNode, RequestBodyNode, ResponseNode, ScalarSchemaNode, ScalarSchemaType, SchemaNode, SchemaNodeByType, SchemaType, SourceNode, StatusCode, StringSchemaNode, TextNode, TimeSchemaNode, TypeNode, UnionSchemaNode, UrlSchemaNode, UserFileNode, Visitor, VisitorContext, applyMacros, index_d_exports as ast, collect, collectImportedRefNames, collectSchemaRefs, collectSync, collectUsedSchemaNames, composeMacros, createPrinter, defineMacro, extractStringsFromNodes, index_d_exports$1 as factory, findCircularSchemas, findCircularSchemasFromGraph, findSchema, forEachChild, forEachSchema, getSchemaLiteralValues, inferDiscriminatorPropertyName, inlineFiles, isBareRef, isHttpOperationNode, isVirtualFile, mergeRefWithSchema, narrowSchema, nodeKinds, optionality, refName, resolveRef, resolveRefName, resolveSchemaProperties, schemaTypes, transform };
|
|
2754
2861
|
}
|
|
2755
2862
|
//#endregion
|
|
2756
|
-
export { type ArraySchemaNode, type ArrowFunctionNode, type BreakNode, type CodeNode, type ConstNode, type ContentNode, type DateOnlyTypeValue, type DateSchemaNode, type DateTimeTypeValue, type DateTypeOptions, type DatetimeSchemaNode, type DistributiveOmit, type Enforce, type EnumSchemaNode, type ExportNode, type FileNode, type FunctionNode, type GenericOperationNode, type HttpMethod, type HttpOperationNode, type ImportNode, type InputMeta, type InputNode, type InputSecurityScheme, type InputServer, type IntersectionSchemaNode, type JSDocNode, type JsxNode, type Macro, type Node, type NodeKind, type NotSchemaNode, type NumberSchemaNode, type ObjectSchemaNode, type OperationNode, type ParameterLocation, type ParameterNode, type ParameterStyle, type ParentOf, type ParserOptions, type PrimitiveSchemaType, type Printer, type PrinterFactoryOptions, type PrinterPartial, type PropertyNode, type RefSchemaNode, type RequestBodyNode, type ResponseNode, type ScalarSchemaNode, type ScalarSchemaType, type SchemaNode, type SchemaNodeByType, type SchemaType, type SourceNode, type StatusCode, type StringSchemaNode, type TextNode, type TimeSchemaNode, type TypeNode, type UnionSchemaNode, type UrlSchemaNode, type UserFileNode, type Visitor, type VisitorContext, index_d_exports as ast, index_d_exports$1 as factory };
|
|
2863
|
+
export { type ArraySchemaNode, type ArrowFunctionNode, type BreakNode, type CodeNode, type ConstNode, type ContentNode, type DateOnlyTypeValue, type DateSchemaNode, type DateTimeTypeValue, type DateTypeOptions, type DatetimeSchemaNode, type DistributiveOmit, type EncodingNode, type Enforce, type EnumSchemaNode, type ExportNode, type FileNode, type FunctionNode, type GenericOperationNode, type HttpMethod, type HttpOperationNode, type ImportNode, type InlineLanguage, type InputMeta, type InputNode, type InputSecurityScheme, type InputServer, type IntersectionSchemaNode, type JSDocNode, type JsxNode, type Macro, type Node, type NodeKind, type NotSchemaNode, type NumberSchemaNode, type ObjectSchemaNode, type OperationNode, type ParameterLocation, type ParameterNode, type ParameterStyle, type ParentOf, type ParserOptions, type PrimitiveSchemaType, type Printer, type PrinterFactoryOptions, type PrinterPartial, type PropertyNode, type RefSchemaNode, type RequestBodyNode, type ResponseNode, type ScalarSchemaNode, type ScalarSchemaType, type SchemaNode, type SchemaNodeByType, type SchemaType, type SourceNode, type StatusCode, type StringSchemaNode, type TextNode, type TimeSchemaNode, type TypeNode, type UnionSchemaNode, type UrlSchemaNode, type UserFileNode, type Visitor, type VisitorContext, index_d_exports as ast, index_d_exports$1 as factory };
|
|
2757
2864
|
//# sourceMappingURL=index.d.ts.map
|