Skip to content

Commit

Permalink
Merge pull request #32 from FlashHit/fix/generateDocs-issues
Browse files Browse the repository at this point in the history
Fix/generate docs issues
  • Loading branch information
Imposter authored May 26, 2022
2 parents fd6b929 + 29900cc commit 8016867
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/stub-gen/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ function generateDocProperty(name: string, p: IDocProperty, comments?: string[])
} else if (p.table) {
code += `${_LT(p.type)}[]`; // Lua table
} else if (p.nestedArray) {
// TODO: Implement
code += `vector|table<integer, vector|${_LT(p.type)}[]>`; // nestedArray
} else if (p.nestedTable) {
// TODO: Implement
code += `table<integer, vector|${_LT(p.type)}[]>`; // nestedTable
} else {
code += `${_LT(p.type)}`;
}
Expand Down Expand Up @@ -139,14 +139,14 @@ function generateDocParam(name: string, p: IDocParam) {
} else if (p.table) {
code += `${_LT(p.type)}[]`; // Lua table
} else if (p.nestedArray) {
// TODO: Implement
code += `vector|table<integer, vector|${_LT(p.type)}[]>`; // nestedArray
} else if (p.nestedTable) {
// TODO: Implement
code += `table<integer, vector|${_LT(p.type)}[]>`; // nestedTable
} else {
code += `${_LT(p.type)}`;
}

if (p.nullable) {
if (p.nullable || p.default) {
code += '|nil';
}
}
Expand Down Expand Up @@ -178,9 +178,9 @@ function generateDocReturn(returns: IDocType | IDocType[], comments?: string[])
} else if (r.table) {
code += `${_LT(r.type)}[]`; // Lua table
} else if (r.nestedArray) {
// TODO: Implement
code += `vector|table<integer, vector|${_LT(r.type)}[]>`; // nestedArray
} else if (r.nestedTable) {
// TODO: Implement
code += `table<integer, vector|${_LT(r.type)}[]>`; // nestedTable
} else {
code += `${_LT(r.type)}`;
}
Expand Down

0 comments on commit 8016867

Please sign in to comment.