From 52334bc49a3b12c01b1c7346aa413cc974cc5ad6 Mon Sep 17 00:00:00 2001 From: Dylan Malandain Date: Sat, 25 May 2019 17:57:14 +0200 Subject: [PATCH] Fix issue #1 --- package.json | 8 +++----- src/content-generate.ts | 10 +++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 679b6ff..b7160c7 100644 --- a/package.json +++ b/package.json @@ -9,16 +9,14 @@ "author": "Dylan Malandain", "license": "MIT", "devDependencies": { - "ts-node": "^8.1.0", - "typescript": "^3.0.1" + "ts-node": "^8.1.1", + "typescript": "^3.4.5" }, "dependencies": { "@akanass/rx-http-request": "^3.1.0", "@types/fs-extra": "^7.0.0", "@types/request": "^2.48.1", "fs-extra": "^8.0.1", - "request": "^2.88.0", - "ts-node": "^8.1.0", - "typescript": "^3.0.1" + "request": "^2.88.0" } } diff --git a/src/content-generate.ts b/src/content-generate.ts index d45909f..3f572bc 100644 --- a/src/content-generate.ts +++ b/src/content-generate.ts @@ -74,7 +74,7 @@ ${_function} /** * Shortcut of data[category][natives] */ - let jsonNative: JSON = data[category][natives]; + let jsonNative: any = data[category][natives]; /** * Generation of the native name @@ -100,7 +100,7 @@ ${_function} * * @return String */ - private nativeName = (data: JSON, natives: String): String => { + private nativeName = (data: any, natives: String): String => { if (data.name !== undefined || natives !== undefined) return (data.name || natives).toLowerCase().replace('0x', 'n_0x').replace(/_([a-z])/g, (sub, bit) => bit.toUpperCase()).replace(/^([a-z])/, (sub, bit) => bit.toUpperCase()); }; @@ -112,7 +112,7 @@ ${_function} * * @return JSON */ - private nativeParams = (data: JSON): { luaDocs: String, params: String, paramsWithType: String } => { + private nativeParams = (data: any): { luaDocs: String, params: String, paramsWithType: String } => { /** * "luaDocs" Allows to save the generation of LUA documentation and return it @@ -137,7 +137,7 @@ ${_function} * * @return String Returns the description of the native or a prefect text indicating the lack of official description */ - private nativeDescription = (data: JSON): String => { + private nativeDescription = (data: any): String => { if (data.description !== undefined) return data.description; else @@ -152,7 +152,7 @@ ${_function} * * @return String Returns the predefined pattern */ - private nativeUsage = (data: JSON, nativeParams: String): String => { + private nativeUsage = (data: any, nativeParams: String): String => { const template = (result, native, params) => `${result} ${native}(${params});`; return template(data.results, data.name, nativeParams);