Skip to content

Commit 631342c

Browse files
authored
feat: add type definitions (#21)
1 parent 8d56737 commit 631342c

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Diff for: index.d.ts

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
declare namespace JsonSchemaToOpenapiSchema {
2+
interface Options {
3+
cloneSchema?: boolean;
4+
dereference?: boolean;
5+
}
6+
}
7+
declare function JsonSchemaToOpenapiSchema<T = Record<string | number, any>>(
8+
schema: Record<string | number, any>,
9+
options?: JsonSchemaToOpenapiSchema.Options
10+
): T;
11+
export = JsonSchemaToOpenapiSchema;

Diff for: package.json

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "0.0.0-development",
44
"description": "Converts a JSON Schema to OpenAPI Schema Object",
55
"main": "index.js",
6+
"types": "index.d.ts",
67
"scripts": {
78
"test": "nyc --reporter=html --reporter=text mocha",
89
"coverage": "nyc report --reporter=text-lcov"

0 commit comments

Comments
 (0)