Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Sorts the lines so that they can are consistently generated

Paul Copplestonecb0e67cedd85
diff --git a/web/ReferenceGenerator.ts b/web/ReferenceGenerator.ts
index 12588924f6d..1bb14176989 100644
--- a/web/ReferenceGenerator.ts
+++ b/web/ReferenceGenerator.ts
@@ -97,7 +97,9 @@ function generateParameters(tsDefinition: any) {
} else functionDeclaration = tsDefinition?.type?.declaration
if (!functionDeclaration) return ''
- const paramDefinitions: TsDoc.TypeDefinition[] = functionDeclaration.signatures[0].parameters // PMC: seems flaky.. why the [0]?
+ const paramDefinitions: TsDoc.TypeDefinition[] = functionDeclaration.signatures[0].parameters.sort(
+ (a, b) => a.name.localeCompare(b.name)
+ ) // PMC: seems flaky.. why the [0]?
if (!paramDefinitions) return ''
// const paramsComments: TsDoc.CommentTag = tsDefinition.comment?.tags?.filter(x => x.tag == 'param')