11import { OverType } from '../../overtype/mock-overtype'
22import type { CommentEnhancer , CommentSpot } from '../enhancer'
33
4- const GITHUB_COMMENT_TYPES = [
4+ const GITHUB_SPOT_TYPES = [
55 'GH_ISSUE_NEW' ,
66 'GH_PR_NEW' ,
77 'GH_ISSUE_ADD_COMMENT' ,
@@ -13,18 +13,18 @@ const GITHUB_COMMENT_TYPES = [
1313 */
1414] as const
1515
16- export type GitHubCommentType = ( typeof GITHUB_COMMENT_TYPES ) [ number ]
16+ export type GitHubSpotType = ( typeof GITHUB_SPOT_TYPES ) [ number ]
1717
1818export interface GitHubSpot extends CommentSpot {
19- type : GitHubCommentType // Override to narrow from string to specific union
19+ type : GitHubSpotType // Override to narrow from string to specific union
2020 domain : string
2121 slug : string // owner/repo
2222 number ?: number | undefined // issue/PR number, undefined for new issues and PRs
2323}
2424
2525export class GitHubEnhancer implements CommentEnhancer < GitHubSpot > {
2626 forSpotTypes ( ) : string [ ] {
27- return [ ...GITHUB_COMMENT_TYPES ]
27+ return [ ...GITHUB_SPOT_TYPES ]
2828 }
2929
3030 tryToEnhance ( textarea : HTMLTextAreaElement ) : [ OverType , GitHubSpot ] | null {
@@ -44,7 +44,7 @@ export class GitHubEnhancer implements CommentEnhancer<GitHubSpot> {
4444 const number = numberStr ? parseInt ( numberStr , 10 ) : undefined
4545
4646 // Determine comment type
47- let type : GitHubCommentType
47+ let type : GitHubSpotType
4848
4949 if ( pathname . includes ( '/issues/new' ) ) {
5050 type = 'GH_ISSUE_NEW'
0 commit comments