Skip to content

Commit 7ad747d

Browse files
author
ntwigg
committed
More renames.
1 parent e7cb0de commit 7ad747d

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

browser-extension/src/datamodel/enhancer.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff 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
}

browser-extension/src/datamodel/handlers/github-handler.ts renamed to browser-extension/src/datamodel/enhancers/github.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
}

browser-extension/src/datamodel/registries.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { OverType } from '../overtype/mock-overtype'
22
import type { CommentEnhancer, CommentSpot } from './enhancer'
3-
import { GitHubHandler as GitHubEnhancer } from './handlers/github-handler'
3+
import { GitHubEnhancer } from './enhancers/github'
44

55
export interface EnhancedTextarea<T extends CommentSpot = CommentSpot> {
66
element: HTMLTextAreaElement

browser-extension/tests/datamodel/handlers/__snapshots__/github-handler.test.ts.snap renamed to browser-extension/tests/datamodel/enhancers/__snapshots__/github.test.ts.snap

File renamed without changes.

browser-extension/tests/datamodel/handlers/github-handler.test.ts renamed to browser-extension/tests/datamodel/enhancers/github.test.ts

File renamed without changes.

0 commit comments

Comments
 (0)