Skip to content

Commit

Permalink
Fix issue #1
Browse files Browse the repository at this point in the history
  • Loading branch information
ImBaphomettt committed May 25, 2019
1 parent b64c84d commit 52334bc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
10 changes: 5 additions & 5 deletions src/content-generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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());
};
Expand All @@ -112,7 +112,7 @@ ${_function}
*
* @return JSON<String luaDocs, String params>
*/
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
Expand All @@ -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
Expand All @@ -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);
Expand Down

0 comments on commit 52334bc

Please sign in to comment.