Skip to content

Commit

Permalink
feat: add type definitions (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
George-Payne authored Mar 17, 2021
1 parent 8d56737 commit 631342c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
declare namespace JsonSchemaToOpenapiSchema {
interface Options {
cloneSchema?: boolean;
dereference?: boolean;
}
}
declare function JsonSchemaToOpenapiSchema<T = Record<string | number, any>>(
schema: Record<string | number, any>,
options?: JsonSchemaToOpenapiSchema.Options
): T;
export = JsonSchemaToOpenapiSchema;
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.0.0-development",
"description": "Converts a JSON Schema to OpenAPI Schema Object",
"main": "index.js",
"types": "index.d.ts",
"scripts": {
"test": "nyc --reporter=html --reporter=text mocha",
"coverage": "nyc report --reporter=text-lcov"
Expand Down

0 comments on commit 631342c

Please sign in to comment.