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 7e0a9f1 + 973e1a0 commit f9a3761Copy full SHA for f9a3761
src/proxy/processors/push-action/parsePush.ts
@@ -341,12 +341,21 @@ interface GitObjectHeader {
341
baseSha?: Buffer;
342
}
343
344
+type GitObjectType =
345
+ | 'commit'
346
+ | 'tree'
347
+ | 'blob'
348
+ | 'tag'
349
+ | 'ofs_delta'
350
+ | 'ref_delta'
351
+ | unknown;
352
+
353
/**
354
* Maps Git object type codes to human-readable names.
355
* @param {number} typeCode Numeric type code from PACK file.
- * @return {string} Git object type as string.
356
+ * @return {GitObjectType} Git object type
357
*/
-const gitObjectType = (typeCode: number): string => {
358
+const gitObjectType = (typeCode: number): GitObjectType => {
359
switch (typeCode) {
360
case 1:
361
return 'commit';
0 commit comments