Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meta: resolve jsx to Preact in shared tsconfig #4923

Merged
merged 2 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/@uppy/audio/src/AudioSourceSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default ({
<select
className="uppy-u-reset uppy-Audio-audioSource-select"
onChange={(event) => {
onChangeSource(event.target.value)
onChangeSource((event.target as HTMLSelectElement).value)
}}
>
{audioSources.map((audioSource) => (
Expand Down
5 changes: 2 additions & 3 deletions packages/@uppy/image-editor/src/Editor.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* eslint-disable jsx-a11y/label-has-associated-control */
import Cropper from 'cropperjs'
import { h, Component } from 'preact'
import type { ChangeEvent } from 'react'
import type { Meta, Body, UppyFile } from '@uppy/utils/lib/UppyFile'
import type { I18n } from '@uppy/utils/lib/Translator'
import getCanvasDataThatFitsPerfectlyIntoContainer from './utils/getCanvasDataThatFitsPerfectlyIntoContainer.ts'
Expand Down Expand Up @@ -119,9 +118,9 @@ export default class Editor<M extends Meta, B extends Body> extends Component<
this.cropper.setCropBoxData(newCanvasData)
}

onRotateGranular = (ev: ChangeEvent<HTMLInputElement>): void => {
onRotateGranular = (ev: Event): void => {
// 1. Set state
const newGranularAngle = Number(ev.target.value)
const newGranularAngle = Number((ev.target as HTMLInputElement).value)
this.setState({ angleGranular: newGranularAngle })

// 2. Rotate the image
Expand Down
1 change: 1 addition & 0 deletions tsconfig.shared.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"emitDeclarationOnly": true,
"declarationMap": true,
"jsx": "preserve",
"jsxImportSource": "preact",
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
Expand Down
Loading