Skip to content

Commit e194847

Browse files
authored
docs: add comment about optional parameter (#556)
1 parent d7ad4ba commit e194847

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

scripts/update-endpoints/templates/endpoints.ts.template

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (
1414
type ExtractParameters<T> = "parameters" extends keyof T
1515
? UnionToIntersection<
1616
{
17+
// query paramter might be optional
18+
// https://github.com/octokit/types.ts/pull/555#issuecomment-1585105522
1719
[K in keyof T["parameters"]]-?: T["parameters"][K];
1820
}[keyof T["parameters"]]
1921
>

src/generated/Endpoints.ts

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (
1414
type ExtractParameters<T> = "parameters" extends keyof T
1515
? UnionToIntersection<
1616
{
17+
// query paramter might be optional
18+
// https://github.com/octokit/types.ts/pull/555#issuecomment-1585105522
1719
[K in keyof T["parameters"]]-?: T["parameters"][K];
1820
}[keyof T["parameters"]]
1921
>

0 commit comments

Comments
 (0)