Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3260fbd

Browse files
🏷️ Relax type guard on SchemaRestPullRequestActivity
1 parent e63ef2c commit 3260fbd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

‎src/server/interfaces/schema_rest_pull_request_activity.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,19 @@ export interface SchemaRestPullRequestActivityUpdated
2929
}
3030

3131
export function isSchemaRestPullRequestActivityCommented(
32-
activity: SchemaRestPullRequestActivity,
32+
activity?: SchemaRestPullRequestActivity|SchemaRestPullRequestActivityBase,
3333
): activity is SchemaRestPullRequestActivityCommented {
34-
return activity.action === "COMMENTED"
34+
return activity?.action === "COMMENTED"
3535
}
3636

3737
export function isSchemaRestPullRequestActivityOpened(
38-
activity: SchemaRestPullRequestActivity,
38+
activity?: SchemaRestPullRequestActivity|SchemaRestPullRequestActivityBase,
3939
): activity is SchemaRestPullRequestActivityOpened {
40-
return activity.action === "OPENED"
40+
return activity?.action === "OPENED"
4141
}
4242

4343
export function isSchemaRestPullRequestActivityUpdated(
44-
activity: SchemaRestPullRequestActivity,
44+
activity?: SchemaRestPullRequestActivity|SchemaRestPullRequestActivityBase,
4545
): activity is SchemaRestPullRequestActivityUpdated {
46-
return activity.action === "UPDATED"
46+
return activity?.action === "UPDATED"
4747
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /