Skip to content

Commit 92566d6

Browse files
committed
fix: Encode functions' args as params
Call `tsifyType` with `isFuncParam` set to `true` for C functions.
1 parent 5a4d2cb commit 92566d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/TypeScript/DefinitionWriter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ void DefinitionWriter::visit(FunctionMeta* meta)
681681
std::ostringstream params;
682682
for (size_t i = 1; i < meta->signature.size(); i++) {
683683
std::string name = sanitizeParameterName(functionDecl.getParamDecl(i - 1)->getNameAsString());
684-
params << (name.size() ? name : "p" + std::to_string(i)) << ": " << tsifyType(*meta->signature[i]);
684+
params << (name.size() ? name : "p" + std::to_string(i)) << ": " << tsifyType(*meta->signature[i], true);
685685
if (i < meta->signature.size() - 1) {
686686
params << ", ";
687687
}

0 commit comments

Comments
 (0)