File tree Expand file tree Collapse file tree 5 files changed +7
-7
lines changed
tests/datamodel/enhancers Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -11,16 +11,16 @@ export interface CommentSpot {
1111}
1212
1313/** wraps the textareas of a given platform with Gitcasso's enhancements */
14- export interface CommentEnhancer < T extends CommentSpot = CommentSpot > {
14+ export interface CommentEnhancer < Spot extends CommentSpot = CommentSpot > {
1515 /** guarantees to only return a type within this list */
1616 forCommentTypes ( ) : string [ ]
1717 /**
1818 * whenever a new `textarea` is added to any webpage, this method is called.
1919 * if we return non-null, then we become the handler for that text area.
2020 */
21- tryToEnhance ( textarea : HTMLTextAreaElement ) : [ OverType , T ] | null
21+ tryToEnhance ( textarea : HTMLTextAreaElement ) : [ OverType , Spot ] | null
2222
23- generateIcon ( context : T ) : string
24- generateDisplayTitle ( context : T ) : string
25- buildUrl ( context : T , withDraft ?: boolean ) : string
23+ generateIcon ( spot : Spot ) : string
24+ generateDisplayTitle ( spot : Spot ) : string
25+ buildUrl ( spot : Spot ) : string
2626}
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export interface GitHubSpot extends CommentSpot {
2222 number ?: number | undefined // issue/PR number, undefined for new issues and PRs
2323}
2424
25- export class GitHubHandler implements CommentEnhancer < GitHubSpot > {
25+ export class GitHubEnhancer implements CommentEnhancer < GitHubSpot > {
2626 forCommentTypes ( ) : string [ ] {
2727 return [ ...GITHUB_COMMENT_TYPES ]
2828 }
Original file line number Diff line number Diff line change 11import type { OverType } from '../overtype/mock-overtype'
22import type { CommentEnhancer , CommentSpot } from './enhancer'
3- import { GitHubHandler as GitHubEnhancer } from './handlers /github-handler '
3+ import { GitHubEnhancer } from './enhancers /github'
44
55export interface EnhancedTextarea < T extends CommentSpot = CommentSpot > {
66 element : HTMLTextAreaElement
File renamed without changes.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments