From 367e8e0a80aa5dce159a66f23fcfcdd3b249f6d2 Mon Sep 17 00:00:00 2001 From: ritz078 Date: Fri, 5 Jun 2020 00:17:58 +0530 Subject: [PATCH] added more data in typescript value --- constants/data.ts | 7 +++++++ pages/api/typescript-to-json-schema.ts | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/constants/data.ts b/constants/data.ts index b4e005a..e6e1c22 100644 --- a/constants/data.ts +++ b/constants/data.ts @@ -355,4 +355,11 @@ export const typeScriptInterface = `export interface Root { id: number; title: string; completed: boolean; +} + +export interface Props { + /** The user's name */ + name: string; + /** Should the name be rendered in bold */ + priority?: boolean }`; diff --git a/pages/api/typescript-to-json-schema.ts b/pages/api/typescript-to-json-schema.ts index 58fd2f6..d234e86 100644 --- a/pages/api/typescript-to-json-schema.ts +++ b/pages/api/typescript-to-json-schema.ts @@ -9,7 +9,7 @@ export default (req: NextApiRequest, res: NextApiResponse) => { const filePath = tempy.writeSync(req.body, { extension: "ts" }); const config: Config = { path: filePath, - expose: "none", + expose: "all", jsDoc: "extended", type: "*" };