Skip to content
This repository has been archived by the owner on Dec 27, 2024. It is now read-only.

Commit

Permalink
fix: use export default for the main function in ts
Browse files Browse the repository at this point in the history
  • Loading branch information
joolfe committed May 19, 2021
1 parent 65a6227 commit baa3173
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "postman-to-openapi",
"version": "1.9.1",
"version": "1.9.2",
"description": "Convert postman collection to OpenAPI spec",
"main": "lib/index.js",
"types": "types/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ export interface Options {
folders?: FoldersOption
}

export function postmanToOpenApi (input: string, output?: string, options?: Options) : string
export default function postmanToOpenApi (input: string, output?: string, options?: Options) : string
6 changes: 2 additions & 4 deletions types/typescript-test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
'use strict'

import {
import postmanToOpenApi, {
Options, ContactObject, LicenseObject, InfoObject,
ServerObject, SecurityObject, ExternalDocsObject,
FoldersOption, postmanToOpenApi
FoldersOption,
} from './index.d'

const contact:ContactObject = {
Expand Down Expand Up @@ -81,5 +81,3 @@ const options:Options = {
const openAPI3 = postmanToOpenApi('./path/to/postman_collection.json', './path/to/result/openApi.yml', options)

})();
// TODO what is really mandatory or not as is not the same that the object is mandatory
// and then inside the object what should be complete, example type in auth?

0 comments on commit baa3173

Please sign in to comment.