|
| 1 | +/* eslint-disable */ |
| 2 | +/** |
| 3 | + * This file was automatically generated by json-schema-to-typescript. |
| 4 | + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, |
| 5 | + * and run json-schema-to-typescript to regenerate this file. |
| 6 | + */ |
| 7 | + |
| 8 | +export type NodeJsAPIDocumentationSchema = DocumentRoot & (Module | Text); |
| 9 | +/** |
| 10 | + * A JavaScript module. |
| 11 | + */ |
| 12 | +export type Module = SectionBase & { |
| 13 | + type: 'module'; |
| 14 | + /** |
| 15 | + * https://jsdoc.app/tags-see |
| 16 | + */ |
| 17 | + '@see': string; |
| 18 | + /** |
| 19 | + * https://jsdoc.app/tags-module |
| 20 | + */ |
| 21 | + '@module': string; |
| 22 | + /** |
| 23 | + * Classes exported from this module. |
| 24 | + */ |
| 25 | + classes?: Class[]; |
| 26 | + /** |
| 27 | + * Methods exported from this module. |
| 28 | + */ |
| 29 | + methods?: Method[]; |
| 30 | + /** |
| 31 | + * APIs that are available globally. |
| 32 | + */ |
| 33 | + globals?: (Class | Method)[]; |
| 34 | + properties?: Property[]; |
| 35 | + [k: string]: unknown; |
| 36 | +}; |
| 37 | +export type Text = SectionBase; |
| 38 | +/** |
| 39 | + * Node.js version number |
| 40 | + */ |
| 41 | +export type NodeCoreVersion = string; |
| 42 | +export type Class = SectionBase & { |
| 43 | + type: 'class'; |
| 44 | + '@constructor': MethodSignature[]; |
| 45 | + methods: Method[]; |
| 46 | + staticMethods: Method[]; |
| 47 | + properties: Property[]; |
| 48 | + [k: string]: unknown; |
| 49 | +}; |
| 50 | +/** |
| 51 | + * A JavaScript function. |
| 52 | + */ |
| 53 | +export type Method = SectionBase & { |
| 54 | + type: 'method'; |
| 55 | + signatures: MethodSignature[]; |
| 56 | + [k: string]: unknown; |
| 57 | +}; |
| 58 | +/** |
| 59 | + * A property on a JavaScript object or class. |
| 60 | + */ |
| 61 | +export type Property = SectionBase & { |
| 62 | + type: 'property'; |
| 63 | + /** |
| 64 | + * JavaScript type of the property. |
| 65 | + */ |
| 66 | + '@type'?: string | [string, ...string[]]; |
| 67 | + /** |
| 68 | + * Is this property modifiable by user code? |
| 69 | + */ |
| 70 | + mutable?: boolean; |
| 71 | + [k: string]: unknown; |
| 72 | +}; |
| 73 | + |
| 74 | +/** |
| 75 | + * Common properties found at the root of each document. |
| 76 | + */ |
| 77 | +export interface DocumentRoot { |
| 78 | + /** |
| 79 | + * The path to the Markdown source used to generate this document. It is relative to the Node.js repository root. |
| 80 | + */ |
| 81 | + source: string; |
| 82 | + [k: string]: unknown; |
| 83 | +} |
| 84 | +/** |
| 85 | + * Common properties found in each section of a document. |
| 86 | + */ |
| 87 | +export interface SectionBase { |
| 88 | + /** |
| 89 | + * Type of the section |
| 90 | + */ |
| 91 | + type: 'module' | 'class' | 'method' | 'property' | 'text'; |
| 92 | + /** |
| 93 | + * https://jsdoc.app/tags-name |
| 94 | + */ |
| 95 | + '@name': string; |
| 96 | + /** |
| 97 | + * Description of the section. |
| 98 | + */ |
| 99 | + description?: string; |
| 100 | + /** |
| 101 | + * Sections that just hold further text on this section. |
| 102 | + */ |
| 103 | + text?: Text[]; |
| 104 | + /** |
| 105 | + * https://jsdoc.app/tags-example |
| 106 | + */ |
| 107 | + '@example'?: string | string[]; |
| 108 | + /** |
| 109 | + * https://jsdoc.app/tags-deprecated |
| 110 | + */ |
| 111 | + '@deprecated'?: NodeCoreVersion[]; |
| 112 | + stability?: Stability; |
| 113 | + /** |
| 114 | + * The changes this API has underwent. |
| 115 | + */ |
| 116 | + changes?: Change[]; |
| 117 | + /** |
| 118 | + * https://jsdoc.app/tags-since |
| 119 | + */ |
| 120 | + '@since'?: NodeCoreVersion[]; |
| 121 | + /** |
| 122 | + * todo what does this describe lol |
| 123 | + */ |
| 124 | + napiVersion?: number[]; |
| 125 | + /** |
| 126 | + * Versions that this was removed in. |
| 127 | + */ |
| 128 | + removedIn?: NodeCoreVersion[]; |
| 129 | + [k: string]: unknown; |
| 130 | +} |
| 131 | +/** |
| 132 | + * Describes the stability of an object. |
| 133 | + */ |
| 134 | +export interface Stability { |
| 135 | + /** |
| 136 | + * The stability value. |
| 137 | + */ |
| 138 | + value: number; |
| 139 | + /** |
| 140 | + * Textual representation of the stability. |
| 141 | + */ |
| 142 | + text: string; |
| 143 | + [k: string]: unknown; |
| 144 | +} |
| 145 | +export interface Change { |
| 146 | + version: NodeCoreVersion[]; |
| 147 | + /** |
| 148 | + * URL to the PR that introduced this change. |
| 149 | + */ |
| 150 | + prUrl?: string; |
| 151 | + /** |
| 152 | + * Description of the change. |
| 153 | + */ |
| 154 | + description: string; |
| 155 | + [k: string]: unknown; |
| 156 | +} |
| 157 | +export interface MethodSignature { |
| 158 | + parameters?: MethodParameter[]; |
| 159 | + /** |
| 160 | + * The method signature's return type. |
| 161 | + */ |
| 162 | + '@returns'?: string | [string, ...string[]]; |
| 163 | + [k: string]: unknown; |
| 164 | +} |
| 165 | +export interface MethodParameter { |
| 166 | + /** |
| 167 | + * Name of the parameter. |
| 168 | + */ |
| 169 | + '@name': string; |
| 170 | + /** |
| 171 | + * Type of the parameter |
| 172 | + */ |
| 173 | + '@type': string | [string, ...string[]]; |
| 174 | + description?: string; |
| 175 | + /** |
| 176 | + * The parameter's default value |
| 177 | + */ |
| 178 | + '@default'?: string; |
| 179 | + [k: string]: unknown; |
| 180 | +} |
0 commit comments