mirror of
https://github.com/langgenius/dify.git
synced 2025-12-19 17:27:16 -05:00
refactor: update TypeScript definitions for custom JSX elements and clean up global declarations in emoji picker (#26985)
This commit is contained in:
@@ -14,16 +14,6 @@ import Divider from '@/app/components/base/divider'
|
||||
import { searchEmoji } from '@/utils/emoji'
|
||||
import cn from '@/utils/classnames'
|
||||
|
||||
declare global {
|
||||
// eslint-disable-next-line ts/no-namespace
|
||||
namespace JSX {
|
||||
// eslint-disable-next-line ts/consistent-type-definitions
|
||||
interface IntrinsicElements {
|
||||
'em-emoji': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
init({ data })
|
||||
|
||||
const backgroundColors = [
|
||||
|
||||
5
web/global.d.ts
vendored
5
web/global.d.ts
vendored
@@ -1,3 +1,6 @@
|
||||
import './types/i18n'
|
||||
import './types/jsx'
|
||||
|
||||
declare module 'lamejs';
|
||||
declare module 'lamejs/src/js/MPEGMode';
|
||||
declare module 'lamejs/src/js/Lame';
|
||||
@@ -9,4 +12,4 @@ declare module '*.mdx' {
|
||||
export default MDXComponent
|
||||
}
|
||||
|
||||
import './types/i18n'
|
||||
export {}
|
||||
|
||||
13
web/types/jsx.d.ts
vendored
Normal file
13
web/types/jsx.d.ts
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
// TypeScript type definitions for custom JSX elements
|
||||
// Custom JSX elements for emoji-mart web components
|
||||
|
||||
import 'react'
|
||||
|
||||
declare module 'react' {
|
||||
namespace JSX {
|
||||
// eslint-disable-next-line ts/consistent-type-definitions
|
||||
interface IntrinsicElements {
|
||||
'em-emoji': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user