/* * @Author: zouyaoji@https://github.com/zouyaoji * @Date: 2021-12-03 15:12:31 * @LastEditTime: 2023-05-04 01:14:20 * @LastEditors: zouyaoji 370681295@qq.com * @Description: * @FilePath: \vue-cesium\typings\global.d.ts */ import { ComponentOptions, ComponentPublicInstance, ComputedOptions, MethodOptions, VNodeProps, AllowedComponentProps, ComponentCustomProps } from 'vue' import { VcAjaxBarProps, VcAnalysesProps, VcAnalysesSlots, VcAnalysisFloodProps, VcBillboardProps, VcBtnProps, VcBtnSlots, VcCollectionBillboardProps, VcCollectionBillboardSlots, VcCollectionLabelProps, VcCollectionLabelSlots, VcCollectionPointProps, VcCollectionPointSlots, VcCollectionPolylineProps, VcCollectionPolylineSlots, VcCollectionPrimitiveProps, VcCollectionPrimitiveSlots, VcCompassProps, VcCompassSmProps, VcConfigProviderProps, VcConfigProviderSlots, VcDatasourceCustomProps, VcDatasourceCustomSlots, VcDatasourceCzmlProps, VcDatasourceCzmlSlots, VcDatasourceGeojsonProps, VcDatasourceGeojsonSlots, VcDatasourceKmlProps, VcDatasourceKmlSlots, VcDistanceLegendProps, VcDrawingsProps, VcDrawingsSlots, VcEntityProps, VcEntitySlots, VcFabActionProps, VcFabActionSlots, VcFabProps, VcFabSlots, VcGeometryBoxOutlineProps, VcGeometryBoxProps, VcGeometryCircleOutlineProps, VcGeometryCircleProps, VcGeometryCorridorOutlineProps, VcGeometryCorridorProps, VcGeometryCylinderOutlineProps, VcGeometryCylinderProps, VcGeometryEllipseOutlineProps, VcGeometryEllipseOutlineRef, VcGeometryEllipseProps, VcGeometryEllipsoidProps, VcGeometryFrustumOutlineProps, VcGeometryFrustumProps, VcGeometryGroundPolylineProps, VcGeometryInstanceProps, VcGeometryInstanceSlots, VcGeometryPlaneOutlineProps, VcGeometryPlaneProps, VcGeometryPolygonCoplanarOutlineProps, VcGeometryPolygonCoplanarProps, VcGeometryPolygonOutlineProps, VcGeometryPolygonProps, VcGeometryPolylineProps, VcGeometryPolylineVolumeOutlineProps, VcGeometryPolylineVolumeProps, VcGeometryRectangleOutlineProps, VcGeometryRectangleProps, VcGeometrySimplePolylineProps, VcGeometrySphereOutlineProps, VcGeometrySphereProps, VcGeometryWallOutlineProps, VcGeometryWallProps, VcGraphicsBillboardProps, VcGraphicsBoxProps, VcGraphicsCorridorProps, VcGraphicsCylinderProps, VcGraphicsEllipseProps, VcGraphicsEllipsoidProps, VcGraphicsLabelProps, VcGraphicsModelProps, VcGraphicsPathProps, VcGraphicsPlaneProps, VcGraphicsPointProps, VcGraphicsPolygonProps, VcGraphicsPolylineProps, VcGraphicsPolylineVolumeProps, VcGraphicsRectangleProps, VcGraphicsTilesetProps, VcGraphicsWallProps, VcIconProps, VcIconRef, VcImageryProviderAmapProps, VcImageryProviderArcgisProps, VcImageryProviderBaiduProps, VcImageryProviderBingProps, VcImageryProviderGoogleProps, VcImageryProviderGridProps, VcImageryProviderIonProps, VcImageryProviderMapboxProps, VcImageryProviderOsmProps, VcImageryProviderSingletileProps, VcImageryProviderSupermapProps, VcImageryProviderTencentProps, VcImageryProviderTiandituProps, VcImageryProviderTileCoordinatesProps, VcImageryProviderTiledcacheProps, VcImageryProviderTmsProps, VcImageryProviderUrltemplateProps, VcImageryProviderWmsProps, VcImageryProviderWmtsProps, VcLabelProps, VcLayerImageryProps, VcLayerImagerySlots, VcMeasurementsProps, VcMeasurementsSlots, VcMyLocationProps, VcNavigationProps, VcNavigationSlots, VcNavigationSmProps, VcNavigationSmSlots, VcOverlayDynamicProps, VcOverlayEchartsProps, VcOverlayHeatmapProps, VcOverlayHtmlProps, VcOverlayHtmlSlots, VcOverlayTyphoonProps, VcOverlayWindmapProps, VcOverviewMapProps, VcOverviewMapSlots, VcPointProps, VcPolygonProps, VcPolylineProps, VcPostProcessStageCollectionProps, VcPostProcessStageCollectionSlots, VcPostProcessStageProps, VcPostProcessStageScanProps, VcPrimitiveClassificationProps, VcPrimitiveClassificationSlots, VcPrimitiveGroundProps, VcPrimitiveGroundSlots, VcPrimitiveI3sDataProviderProps, VcPrimitiveModelProps, VcPrimitiveModelSlots, VcPrimitiveOsmBuildingsProps, VcPrimitiveParticleProps, VcPrimitiveProps, VcPrimitiveSlots, VcPrimitiveTilesetProps, VcPrimitiveTimeDynamicPointCloudProps, VcSelectionIndicatorProps, VcSpinnerBallProps, VcSpinnerBarsProps, VcSpinnerDotsProps, VcSpinnerGearsProps, VcSpinnerHourglassProps, VcSpinnerIosProps, VcSpinnerOrbitProps, VcSpinnerOvalProps, VcSpinnerProps, VcSpinnerPuffProps, VcSpinnerRingsProps, VcSpinnerTailProps, VcTerrainProviderArcgisProps, VcTerrainProviderCesiumProps, VcTerrainProviderTiandituProps, VcTerrainProviderVrTheworldProps, VcTooltipProps, VcTooltipSlots, VcViewerProps, VcViewerSlots, VcZoomControlProps, VcZoomControlSmProps } from 'vue-cesium' export type StringDictionary = Required<{ [index in T]: string }> // Needed to prevent TS to collapse `'value1' | 'value2' | string` to `string`, which breaks first parameter autocomplete // See: https://github.com/microsoft/TypeScript/issues/29729#issuecomment-832522611 export type LiteralUnion = T | (U & Record) // See: https://stackoverflow.com/a/49936686/7931540 export type DeepPartial = { [P in keyof T]?: T[P] extends Array ? Array> : T[P] extends ReadonlyArray ? ReadonlyArray> : DeepPartial } // Create a fake constructor signature for a Vue component, needed to correctly extract/infer Component type in many situation, // especially into VTU to automatically infer Quasar components type when using `findComponent` // This type is compatible with the Vue private `ComponentPublicInstanceConstructor` type // https://github.com/vuejs/vue-next/blob/011dee8644bb52f5bdc6365c6e8404936d57e2cd/packages/runtime-core/src/componentPublicInstance.ts#L111 export type ComponentConstructor< Component extends ComponentPublicInstance = ComponentPublicInstance, Props = any, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions > = { new (): Component } & ComponentOptions // https://github.com/vuejs/vue-next/blob/d84d5ecdbdf709570122175d6565bb61fae877f2/packages/runtime-core/src/apiDefineComponent.ts#L29-L31 // TODO: This can be imported from vue directly once this PR gets merged: https://github.com/vuejs/vue-next/pull/2403 export type PublicProps = VNodeProps & AllowedComponentProps & ComponentCustomProps type EmptyObject = { [K in never]: never } // Can't use `DefineComponent` because of the false prop inferring behavior, it doesn't pick up the required types when an interface is passed // This PR will probably solve the problem as it moves the prop inferring behavior to `defineComponent` function: https://github.com/vuejs/vue-next/pull/4465 // GlobalComponentConstructor helper is kind of like the ComponentConstructor type helper, but simpler and keeps the Volar errors simpler, // and also similar to the usage in official Vue packages: https://github.com/vuejs/vue-next/blob/d84d5ecdbdf709570122175d6565bb61fae877f2/packages/runtime-core/src/components/BaseTransition.ts#L258-L264 or https://github.com/vuejs/vue-router-next/blob/5dd5f47515186ce34efb9118dda5aad0bb773439/src/RouterView.ts#L160-L172 etc. // TODO: This can be replaced with `DefineComponent` once this PR gets merged: https://github.com/vuejs/vue-next/pull/4465 export type GlobalComponentConstructor = { new (): { $props: PublicProps & Props $slots: Slots } } // GlobalComponents for Volar declare module 'vue' { export interface GlobalComponents { VcViewer: GlobalComponentConstructor VcNavigation: GlobalComponentConstructor VcCompass: GlobalComponentConstructor VcZoomControl: GlobalComponentConstructor VcMyLocation: GlobalComponentConstructor VcDistanceLegend: GlobalComponentConstructor VcNavigationSm: GlobalComponentConstructor VcCompassSm: GlobalComponentConstructor VcZoomControlSm: GlobalComponentConstructor VcOverviewMap: GlobalComponentConstructor VcSelectionIndicator: GlobalComponentConstructor VcMeasurements: GlobalComponentConstructor VcDrawings: GlobalComponentConstructor VcAnalyses: GlobalComponentConstructor VcAnalysisFlood: GlobalComponentConstructor VcLayerImagery: GlobalComponentConstructor VcImageryProviderAmap: GlobalComponentConstructor VcImageryProviderArcgis: GlobalComponentConstructor VcImageryProviderBaidu: GlobalComponentConstructor VcImageryProviderBing: GlobalComponentConstructor VcImageryProviderGoogle: GlobalComponentConstructor VcImageryProviderGrid: GlobalComponentConstructor VcImageryProviderIon: GlobalComponentConstructor VcImageryProviderMapbox: GlobalComponentConstructor VcImageryProviderOsm: GlobalComponentConstructor VcImageryProviderSingletile: GlobalComponentConstructor VcImageryProviderSupermap: GlobalComponentConstructor VcImageryProviderTencent: GlobalComponentConstructor VcImageryProviderTianditu: GlobalComponentConstructor VcImageryProviderTileCoordinates: GlobalComponentConstructor VcImageryProviderTms: GlobalComponentConstructor VcImageryProviderTiledcache: GlobalComponentConstructor VcImageryProviderUrltemplate: GlobalComponentConstructor VcImageryProviderWms: GlobalComponentConstructor VcImageryProviderWmts: GlobalComponentConstructor VcTerrainProviderCesium: GlobalComponentConstructor VcTerrainProviderArcgis: GlobalComponentConstructor VcTerrainProviderVrTheworld: GlobalComponentConstructor VcTerrainProviderTianditu: GlobalComponentConstructor VcDatasourceCustom: GlobalComponentConstructor VcDatasourceCzml: GlobalComponentConstructor VcDatasourceGeojson: GlobalComponentConstructor VcDatasourceKml: GlobalComponentConstructor VcEntity: GlobalComponentConstructor VcGraphicsBillboard: GlobalComponentConstructor VcGraphicsBox: GlobalComponentConstructor VcGraphicsCorridor: GlobalComponentConstructor VcGraphicsCylinder: GlobalComponentConstructor VcGraphicsEllipse: GlobalComponentConstructor VcGraphicsEllipsoid: GlobalComponentConstructor VcGraphicsLabel: GlobalComponentConstructor VcGraphicsModel: GlobalComponentConstructor VcGraphicsPath: GlobalComponentConstructor VcGraphicsPlane: GlobalComponentConstructor VcGraphicsPoint: GlobalComponentConstructor VcGraphicsPolygon: GlobalComponentConstructor VcGraphicsPolyline: GlobalComponentConstructor VcGraphicsPolylineVolume: GlobalComponentConstructor VcGraphicsRectangle: GlobalComponentConstructor VcGraphicsTileset: GlobalComponentConstructor VcGraphicsWall: GlobalComponentConstructor VcPrimitiveClassification: GlobalComponentConstructor VcPrimitiveGround: GlobalComponentConstructor VcPrimitiveGroundPolyline: GlobalComponentConstructor VcPrimitiveModel: GlobalComponentConstructor VcPrimitive: GlobalComponentConstructor VcPrimitiveTileset: GlobalComponentConstructor VcPrimitiveParticle: GlobalComponentConstructor VcPrimitiveTimeDynamicPointCloud: GlobalComponentConstructor VcPrimitiveI3sDataProvider: GlobalComponentConstructor VcPrimitiveOsmBuildings: GlobalComponentConstructor VcCollectionBillboard: GlobalComponentConstructor VcCollectionLabel: GlobalComponentConstructor VcCollectionPoint: GlobalComponentConstructor VcCollectionPolyline: GlobalComponentConstructor VcCollectionPrimitive: GlobalComponentConstructor VcBillboard: GlobalComponentConstructor VcLabel: GlobalComponentConstructor VcPoint: GlobalComponentConstructor VcPolyline: GlobalComponentConstructor VcPolygon: GlobalComponentConstructor VcGeometryInstance: GlobalComponentConstructor VcGeometryBox: GlobalComponentConstructor VcGeometryBoxOutline: GlobalComponentConstructor VcGeometryCircle: GlobalComponentConstructor VcGeometryCircleOutline: GlobalComponentConstructor VcGeometryPolygonCoplanar: GlobalComponentConstructor VcGeometryPolygonCoplanarOutline: GlobalComponentConstructor VcGeometryCorridor: GlobalComponentConstructor VcGeometryCorridorOutline: GlobalComponentConstructor VcGeometryCylinder: GlobalComponentConstructor VcGeometryCylinderOutline: GlobalComponentConstructor VcGeometryEllipse: GlobalComponentConstructor VcGeometryEllipseOutline: GlobalComponentConstructor VcGeometryEllipsoid: GlobalComponentConstructor VcGeometryEllipsoidOutline: GlobalComponentConstructor VcGeometryFrustum: GlobalComponentConstructor VcGeometryFrustumOutline: GlobalComponentConstructor VcGeometryGroundPolyline: GlobalComponentConstructor VcGeometryPlane: GlobalComponentConstructor VcGeometryPlaneOutline: GlobalComponentConstructor VcGeometryPolygon: GlobalComponentConstructor VcGeometryPolygonOutline: GlobalComponentConstructor VcGeometryPolyline: GlobalComponentConstructor VcGeometryPolylineVolume: GlobalComponentConstructor VcGeometryPolylineVolumeOutline: GlobalComponentConstructor VcGeometryRectangle: GlobalComponentConstructor VcGeometryRectangleOutline: GlobalComponentConstructor VcGeometrySimplePolyline: GlobalComponentConstructor VcGeometrySphere: GlobalComponentConstructor VcGeometrySphereOutline: GlobalComponentConstructor VcGeometryWall: GlobalComponentConstructor VcGeometryWallOutline: GlobalComponentConstructor VcOverlayHtml: GlobalComponentConstructor VcOverlayHeatmap: GlobalComponentConstructor VcOverlayWind: GlobalComponentConstructor VcOverlayDynamic: GlobalComponentConstructor VcOverlayEcharts: GlobalComponentConstructor VcOverlayTyphoon: GlobalComponentConstructor VcPostProcessStage: GlobalComponentConstructor VcPostProcessStageScan: GlobalComponentConstructor VcPostProcessStageCollection: GlobalComponentConstructor VcBtn: GlobalComponentConstructor VcIcon: GlobalComponentConstructor VcTooltip: GlobalComponentConstructor VcAjaxBar: GlobalComponentConstructor VcSkeleton: GlobalComponentConstructor VcSpinnerBall: GlobalComponentConstructor VcSpinnerBars: GlobalComponentConstructor VcSpinnerDots: GlobalComponentConstructor VcSpinnerGears: GlobalComponentConstructor VcSpinnerHourglass: GlobalComponentConstructor VcSpinnerIos: GlobalComponentConstructor VcSpinnerOrbit: GlobalComponentConstructor VcSpinnerOval: GlobalComponentConstructor VcSpinnerPuff: GlobalComponentConstructor VcSpinnerRings: GlobalComponentConstructor VcSpinnerTail: GlobalComponentConstructor VcSpinner: GlobalComponentConstructor VcFab: GlobalComponentConstructor VcFabAction: GlobalComponentConstructor VcConfigProvider: GlobalComponentConstructor } } export {}