import { JSX, JSXElement } from 'solid-js' import { TaroElement } from '@tarojs/runtime' import { AdProps } from '@tarojs/components/types/Ad' import { AdCustomProps } from '@tarojs/components/types/AdCustom' import { AudioProps } from '@tarojs/components/types/Audio' import { ButtonProps } from '@tarojs/components/types/Button' import { CameraProps } from '@tarojs/components/types/Camera' import { CanvasProps } from '@tarojs/components/types/Canvas' import { ChannelLiveProps } from '@tarojs/components/types/ChannelLive' import { ChannelVideoProps } from '@tarojs/components/types/ChannelVideo' import { CheckboxProps } from '@tarojs/components/types/Checkbox' import { CheckboxGroupProps } from '@tarojs/components/types/CheckboxGroup' import { StandardProps } from '@tarojs/components/types/common' import { CoverImageProps } from '@tarojs/components/types/CoverImage' import { CoverViewProps } from '@tarojs/components/types/CoverView' import { CustomWrapperProps } from '@tarojs/components/types/CustomWrapper' import { EditorProps } from '@tarojs/components/types/Editor' import { FormProps } from '@tarojs/components/types/Form' import { FunctionalPageNavigatorProps } from '@tarojs/components/types/FunctionalPageNavigator' import { GridViewProps } from '@tarojs/components/types/GridView' import { IconProps } from '@tarojs/components/types/Icon' import { ImageProps } from '@tarojs/components/types/Image' import { InputProps } from '@tarojs/components/types/Input' import { KeyboardAccessoryProps } from '@tarojs/components/types/KeyboardAccessory' import { LabelProps } from '@tarojs/components/types/Label' import { ListViewProps } from '@tarojs/components/types/ListView' import { LivePlayerProps } from '@tarojs/components/types/LivePlayer' import { LivePusherProps } from '@tarojs/components/types/LivePusher' import { MapProps } from '@tarojs/components/types/Map' import { MatchMediaProps } from '@tarojs/components/types/MatchMedia' import { MovableAreaProps } from '@tarojs/components/types/MovableArea' import { MovableViewProps } from '@tarojs/components/types/MovableView' import { NativeSlotProps } from '@tarojs/components/types/NativeSlot' import { NavigationBarProps } from '@tarojs/components/types/NavigationBar' import { NavigatorProps } from '@tarojs/components/types/Navigator' import { OfficialAccountProps } from '@tarojs/components/types/OfficialAccount' import { OpenDataProps } from '@tarojs/components/types/OpenData' import { PageContainerProps } from '@tarojs/components/types/PageContainer' import { PageMetaProps } from '@tarojs/components/types/PageMeta' import { PickerDateProps, PickerMultiSelectorProps, PickerRegionProps, PickerSelectorProps, PickerTimeProps } from '@tarojs/components/types/Picker' import { PickerViewProps } from '@tarojs/components/types/PickerView' import { PickerViewColumnProps } from '@tarojs/components/types/PickerViewColumn' import { ProgressProps } from '@tarojs/components/types/Progress' import { RadioProps } from '@tarojs/components/types/Radio' import { RadioGroupProps } from '@tarojs/components/types/RadioGroup' import { RichTextProps } from '@tarojs/components/types/RichText' import { RootPortalProps } from '@tarojs/components/types/RootPortal' import { ScrollViewProps } from '@tarojs/components/types/ScrollView' import { ShareElementProps } from '@tarojs/components/types/ShareElement' import { SliderProps } from '@tarojs/components/types/Slider' import { SlotProps } from '@tarojs/components/types/Slot' import { SnapshotProps } from '@tarojs/components/types/SnapShot' import { StickyHeaderProps } from '@tarojs/components/types/StickyHeader' import { StickySectionProps } from '@tarojs/components/types/StickySection' import { SwiperProps } from '@tarojs/components/types/Swiper' import { SwiperItemProps } from '@tarojs/components/types/SwiperItem' import { SwitchProps } from '@tarojs/components/types/Switch' import { TextProps } from '@tarojs/components/types/Text' import { TextareaProps } from '@tarojs/components/types/Textarea' import { VideoProps } from '@tarojs/components/types/Video' import { ViewProps } from '@tarojs/components/types/View' import { VoipRoomProps } from '@tarojs/components/types/VoipRoom' import { WebViewProps } from '@tarojs/components/types/WebView' // 重置react的类型 interface SlimProps { children?: JSXElement class?: string style?: string | JSX.CSSProperties | undefined innerHTML?: string } /** 联合类型不能用omit(比如picker) */ type DistributiveOmit = T extends unknown ? Omit : never export type RemoveReactAttribute = 'children' | 'className' | 'style' | 'key' | 'ref' | 'dangerouslySetInnerHTML' export type TransformReact2SolidType

> = DistributiveOmit & SlimProps & JSX.DirectiveAttributes & JSX.CustomAttributes type Components = (props: TransformReact2SolidType) => JSXElement; /** 视图容器 */ export declare const Block: Components export declare const CoverImage: Components export declare const CoverView: Components export declare const GridView: Components export declare const ListView: Components export declare const MatchMedia: Components export declare const MovableArea: Components export declare const MovableView: Components export declare const PageContainer: Components export declare const RootPortal: Components export declare const ScrollView: Components export declare const ShareElement: Components export declare const StickyHeader: Components export declare const StickySection: Components export declare const Swiper: Components export declare const SwiperItem: Components export declare const View: Components /** 基础内容 */ export declare const Icon: Components export declare const Progress: Components export declare const RichText: Components export declare const Text: Components /** 表单组件 */ export declare const Button: Components export declare const Checkbox: Components export declare const CheckboxGroup: Components export declare const Editor: Components export declare const Form: Components export declare const Input: Components export declare const KeyboardAccessory: Components export declare const Label: Components export declare const Picker: Components export declare const PickerView: Components export declare const PickerViewColumn: Components export declare const Radio: Components export declare const RadioGroup: Components export declare const Slider: Components export declare const Switch: Components export declare const Textarea: Components /** 导航 */ export declare const FunctionalPageNavigator: Components export declare const Navigator: Components export declare const NavigationBar: Components /** 媒体组件 */ export declare const Audio: Components export declare const Camera: Components export declare const ChannelLive: Components export declare const ChannelVideo: Components export declare const Image: Components export declare const LivePlayer: Components export declare const LivePusher: Components export declare const Video: Components export declare const VoipRoom: Components /** 地图 */ export declare const Map: Components /** 画布 */ export declare const Canvas: Components /** 开放能力 */ export declare const Ad: Components export declare const AdCustom: Components export declare const OfficialAccount: Components export declare const OpenData: Components export declare const WebView: Components /** 配置节点 */ export declare const PageMeta: Components export declare const CustomWrapper: Components export declare const Slot: Components export declare const NativeSlot: Components declare global { namespace JSX { interface IntrinsicElements { /** 视图容器 */ block: TransformReact2SolidType 'taro-block-core': TransformReact2SolidType 'cover-image': TransformReact2SolidType 'taro-cover-image-core': TransformReact2SolidType 'cover-view': TransformReact2SolidType 'taro-cover-view-core': TransformReact2SolidType 'match-media': TransformReact2SolidType 'taro-match-media-core': TransformReact2SolidType 'movable-area': TransformReact2SolidType 'taro-movable-area-core': TransformReact2SolidType 'movable-view': TransformReact2SolidType 'taro-movable-view-core': TransformReact2SolidType 'page-container': TransformReact2SolidType 'taro-page-container-core': TransformReact2SolidType 'root-portal': TransformReact2SolidType 'taro-root-portal-core': TransformReact2SolidType 'scroll-view': TransformReact2SolidType 'taro-scroll-view-core': TransformReact2SolidType swiper: TransformReact2SolidType 'taro-swiper-core': TransformReact2SolidType 'swiper-item': TransformReact2SolidType 'taro-swiper-item-core': TransformReact2SolidType view: TransformReact2SolidType 'taro-view-core': TransformReact2SolidType /** 基础内容 */ icon: TransformReact2SolidType 'taro-icon-core': TransformReact2SolidType progress: TransformReact2SolidType 'taro-progress-core': TransformReact2SolidType 'rich-text': TransformReact2SolidType 'taro-rich-text-core': TransformReact2SolidType text: TransformReact2SolidType 'taro-text-core': TransformReact2SolidType /** 表单组件 */ button: TransformReact2SolidType 'taro-button-core': TransformReact2SolidType checkbox: TransformReact2SolidType 'taro-checkbox-core': TransformReact2SolidType 'checkbox-group': TransformReact2SolidType 'taro-checkbox-group-core': TransformReact2SolidType editor: TransformReact2SolidType 'taro-editor-core': TransformReact2SolidType form: TransformReact2SolidType 'taro-form-core': TransformReact2SolidType input: TransformReact2SolidType 'taro-input-core': TransformReact2SolidType 'keyboard-accessory': TransformReact2SolidType 'taro-keyboard-accessory-core': TransformReact2SolidType label: TransformReact2SolidType 'taro-label-core': TransformReact2SolidType picker: TransformReact2SolidType 'taro-picker-core': TransformReact2SolidType 'picker-view': TransformReact2SolidType 'taro-picker-view-core': TransformReact2SolidType 'picker-view-column': TransformReact2SolidType 'taro-picker-view-column-core': TransformReact2SolidType radio: TransformReact2SolidType 'taro-radio-core': TransformReact2SolidType 'radio-group': TransformReact2SolidType 'taro-radio-group-core': TransformReact2SolidType slider: TransformReact2SolidType 'taro-slider-core': TransformReact2SolidType switch: TransformReact2SolidType 'taro-switch-core': TransformReact2SolidType textarea: TransformReact2SolidType 'taro-textarea-core': TransformReact2SolidType /** Skyline */ 'grid-view': TransformReact2SolidType 'taro-grid-view-core': TransformReact2SolidType 'list-view': TransformReact2SolidType 'taro-list-view-core': TransformReact2SolidType 'share-element': TransformReact2SolidType 'taro-share-element-core': TransformReact2SolidType 'snapshot': TransformReact2SolidType 'taro-snapshot-core': TransformReact2SolidType 'sticky-header': TransformReact2SolidType 'taro-sticky-header-core': TransformReact2SolidType 'sticky-section': TransformReact2SolidType 'taro-sticky-section-core': TransformReact2SolidType /** 导航 */ 'functional-page-navigator': TransformReact2SolidType 'taro-functional-page-navigator-core': TransformReact2SolidType navigator: TransformReact2SolidType 'taro-navigator-core': TransformReact2SolidType 'navigation-bar': TransformReact2SolidType 'taro-navigation-bar-core': TransformReact2SolidType /** 媒体组件 */ audio: TransformReact2SolidType 'taro-audio-core': TransformReact2SolidType camera: TransformReact2SolidType 'taro-camera-core': TransformReact2SolidType 'channel-live': TransformReact2SolidType 'taro-channel-live-core': TransformReact2SolidType 'channel-video': TransformReact2SolidType 'taro-channel-video-core': TransformReact2SolidType image: TransformReact2SolidType 'taro-image-core': TransformReact2SolidType 'live-player': TransformReact2SolidType 'taro-live-player-core': TransformReact2SolidType 'live-pusher': TransformReact2SolidType 'taro-live-pusher-core': TransformReact2SolidType video: TransformReact2SolidType 'taro-video-core': TransformReact2SolidType 'voip-room': TransformReact2SolidType 'taro-voip-room-core': TransformReact2SolidType /** 地图 */ map: TransformReact2SolidType 'taro-map-core': TransformReact2SolidType /** 画布 */ canvas: TransformReact2SolidType 'taro-canvas-core': TransformReact2SolidType /** 开放能力 */ ad: TransformReact2SolidType 'taro-ad-core': TransformReact2SolidType 'ad-custom': TransformReact2SolidType 'taro-ad-custom-core': TransformReact2SolidType 'official-account': TransformReact2SolidType 'taro-official-account-core': TransformReact2SolidType 'open-data': TransformReact2SolidType 'taro-open-data-core': TransformReact2SolidType 'web-view': TransformReact2SolidType 'taro-web-view-core': TransformReact2SolidType /** 配置节点 */ 'page-meta': TransformReact2SolidType 'taro-page-meta-core': TransformReact2SolidType 'custom-wrapper': TransformReact2SolidType 'taro-custom-wrapper-core': TransformReact2SolidType /** 为了不与vue3模板默认的slot冲突,增加 Record */ 'slot': TransformReact2SolidType & Record 'taro-slot-core': TransformReact2SolidType 'native-slot': TransformReact2SolidType 'taro-native-slot-core': TransformReact2SolidType } } }