Skip to content

Commit

Permalink
Fix event types
Browse files Browse the repository at this point in the history
  • Loading branch information
niedzielski committed Dec 19, 2023
1 parent f404854 commit 8b01bfe
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/ui/components/play-console.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {Bubble} from '../bubble.js'

declare global {
interface HTMLElementEventMap {
'open-line': OpenLine
'open-line': CustomEvent<OpenLine>
}
interface HTMLElementTagNameMap {
'play-console': PlayConsole
Expand Down
4 changes: 2 additions & 2 deletions src/ui/components/play-editor/play-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import {newEditorState} from './editor-state.js'

declare global {
interface HTMLElementEventMap {
edit: string
'edit-template': string
edit: CustomEvent<string>
'edit-template': CustomEvent<string>
}
interface HTMLElementTagNameMap {
'play-editor': PlayEditor
Expand Down
2 changes: 1 addition & 1 deletion src/ui/components/play-new-pen-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const iconSizes: {[key in SizeOptions]: string} = {

declare global {
interface HTMLElementEventMap {
'edit-src': string
'edit-src': CustomEvent<string>
}
interface HTMLElementTagNameMap {
'play-new-pen-button': PlayNewPenButton
Expand Down
4 changes: 2 additions & 2 deletions src/ui/components/play-pen-header.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import './play-resizable-text-input.js'

declare global {
interface HTMLElementEventMap {
'edit-name': string
share: undefined
'edit-name': CustomEvent<string>
share: CustomEvent<undefined>
}
interface HTMLElementTagNameMap {
'play-pen-header': PlayPenHeader
Expand Down
4 changes: 2 additions & 2 deletions src/ui/components/play-preview-controls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ const sizes: readonly [width: number, label: string][] = [

declare global {
interface HTMLElementEventMap {
'preview-scheme': ColorScheme
'preview-width': number
'preview-scheme': CustomEvent<ColorScheme>
'preview-width': CustomEvent<number>
}
interface HTMLElementTagNameMap {
'play-preview-controls': PlayPreviewControls
Expand Down
6 changes: 3 additions & 3 deletions src/ui/components/play-preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import type {PreviewError} from '../../types/preview-error.js'

declare global {
interface HTMLElementEventMap {
error: PreviewError
'clear-errors': undefined
'devvit-ui-error': unknown
error: CustomEvent<PreviewError>
'clear-errors': CustomEvent<undefined>
'devvit-ui-error': CustomEvent<unknown>
}
interface HTMLElementTagNameMap {
'play-preview': PlayPreview
Expand Down
2 changes: 1 addition & 1 deletion src/ui/components/play-resizable-text-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {Bubble} from '../bubble.js'

declare global {
interface HTMLElementEventMap {
'edit-text': string
'edit-text': CustomEvent<string>
}
interface HTMLElementTagNameMap {
'play-resizable-text-input': PlayResizableTextInput
Expand Down

0 comments on commit 8b01bfe

Please sign in to comment.