Skip to content

Commit 68d89e5

Browse files
committed
Add type definitions for openapi-format
1 parent c6f16b5 commit 68d89e5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

types/openapi-format.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,23 +151,23 @@ declare module 'openapi-format' {
151151
* Parses a JSON or YAML file into a JavaScript object.
152152
* @param {string} filePath - The path to the JSON or YAML file.
153153
* @param {Record<string, unknown>} [options] - Additional parsing options.
154-
* @returns {Promise<Record<string, unknown>>} The parsed data object.
154+
* @returns {Promise<Record<string, any>>} The parsed data object.
155155
*/
156156
export function parseFile(
157157
filePath: string,
158158
options?: Record<string, unknown>
159-
): Promise<Record<string, unknown>>;
159+
): Promise<Record<string, any>>
160160

161161
/**
162162
* Parses a JSON or YAML string into a JavaScript object.
163163
* @param {string} input - The JSON or YAML string.
164164
* @param {Record<string, unknown>} [options] - Additional parsing options.
165-
* @returns {Promise<Record<string, unknown>>} The parsed data object.
165+
* @returns {Promise<Record<string, any>>} The parsed data object.
166166
*/
167167
export function parseString(
168168
input: string,
169169
options?: Record<string, unknown>
170-
): Promise<OpenAPIResult | OpenAPISortOptions | OpenAPIFilterOptions | OpenAPIV3.Document | Record<string, unknown>>
170+
): Promise<Record<string, any>>
171171

172172
/**
173173
* Detects the format of a given string as either JSON or YAML.
@@ -187,7 +187,7 @@ declare module 'openapi-format' {
187187
*/
188188
export function writeFile(
189189
filePath: string,
190-
data: Record<string, unknown> | OpenAPIV3.Document,
190+
data: Record<string, unknown>,
191191
options?: WriteFileOptions
192192
): Promise<void>;
193193
/**

0 commit comments

Comments
 (0)