We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7734428 + 10fb468 commit 1f901e6Copy full SHA for 1f901e6
scripts/extract-indices.js
@@ -92,9 +92,23 @@ const createIndex = result => {
92
// NextJS router
93
return result.reduce((acc, data) => {
94
const { signatures = [], moduleName, headers } = data;
95
+
96
+ // Sort the headers, but keep type `t` as the first header.
97
+ const headersSorted = [...headers].sort(
98
+ (headerA, headerB) => {
99
+ if (headerA.name === 't') {
100
+ return -1
101
+ } else if (headerB.name === 't') {
102
+ return 1
103
+ } else {
104
+ return headerA.name.localeCompare(headerB.name)
105
+ }
106
107
+ );
108
109
acc["/" + data.href] = {
110
moduleName,
- headers
111
+ headers: headersSorted
112
};
113
114
return acc;
0 commit comments