Skip to content

Commit

Permalink
feat(ts): add .d.ts using vue-tsc
Browse files Browse the repository at this point in the history
  • Loading branch information
vinayakkulkarni committed Mar 1, 2022
1 parent 4d2ea5a commit 745afee
Show file tree
Hide file tree
Showing 22 changed files with 1,016 additions and 14 deletions.
62 changes: 62 additions & 0 deletions types/controls/VControlAttribution.vue.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import type { PropType } from 'vue';
declare const _default: import('vue').DefineComponent<
{
options: {
type: PropType<{
compact?: boolean | undefined;
customAttribution?: string | string[] | undefined;
}>;
default: () => {
compact: boolean;
customAttribution: string;
};
required: true;
};
position: {
type: PropType<'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'>;
default: () => string;
required: false;
};
},
void,
unknown,
{},
{},
import('vue').ComponentOptionsMixin,
import('vue').ComponentOptionsMixin,
Record<string, any>,
string,
import('vue').VNodeProps &
import('vue').AllowedComponentProps &
import('vue').ComponentCustomProps,
Readonly<
import('vue').ExtractPropTypes<{
options: {
type: PropType<{
compact?: boolean | undefined;
customAttribution?: string | string[] | undefined;
}>;
default: () => {
compact: boolean;
customAttribution: string;
};
required: true;
};
position: {
type: PropType<
'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'
>;
default: () => string;
required: false;
};
}>
>,
{
options: {
compact?: boolean | undefined;
customAttribution?: string | string[] | undefined;
};
position: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
}
>;
export default _default;
49 changes: 49 additions & 0 deletions types/controls/VControlFullscreen.vue.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/// <reference types="@types/mapbox-gl" />
import type { FullscreenControlOptions } from 'mapbox-gl';
import type { PropType } from 'vue';
declare const _default: import('vue').DefineComponent<
{
options: {
type: PropType<FullscreenControlOptions>;
default: () => {};
required: true;
};
position: {
type: PropType<'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'>;
default: () => string;
required: false;
};
},
void,
unknown,
{},
{},
import('vue').ComponentOptionsMixin,
import('vue').ComponentOptionsMixin,
Record<string, any>,
string,
import('vue').VNodeProps &
import('vue').AllowedComponentProps &
import('vue').ComponentCustomProps,
Readonly<
import('vue').ExtractPropTypes<{
options: {
type: PropType<FullscreenControlOptions>;
default: () => {};
required: true;
};
position: {
type: PropType<
'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'
>;
default: () => string;
required: false;
};
}>
>,
{
options: FullscreenControlOptions;
position: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
}
>;
export default _default;
67 changes: 67 additions & 0 deletions types/controls/VControlGeolocate.vue.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/// <reference types="@types/mapbox-gl" />
import type { FitBoundsOptions, PositionOptions } from 'mapbox-gl';
import type { PropType } from 'vue';
declare const _default: import('vue').DefineComponent<
{
options: {
type: PropType<{
positionOptions?: PositionOptions | undefined;
fitBoundsOptions?: FitBoundsOptions | undefined;
trackUserLocation?: boolean | undefined;
showAccuracyCircle?: boolean | undefined;
showUserLocation?: boolean | undefined;
}>;
default: () => {};
required: true;
};
position: {
type: PropType<'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'>;
default: () => string;
required: false;
};
},
void,
unknown,
{},
{},
import('vue').ComponentOptionsMixin,
import('vue').ComponentOptionsMixin,
Record<string, any>,
string,
import('vue').VNodeProps &
import('vue').AllowedComponentProps &
import('vue').ComponentCustomProps,
Readonly<
import('vue').ExtractPropTypes<{
options: {
type: PropType<{
positionOptions?: PositionOptions | undefined;
fitBoundsOptions?: FitBoundsOptions | undefined;
trackUserLocation?: boolean | undefined;
showAccuracyCircle?: boolean | undefined;
showUserLocation?: boolean | undefined;
}>;
default: () => {};
required: true;
};
position: {
type: PropType<
'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'
>;
default: () => string;
required: false;
};
}>
>,
{
options: {
positionOptions?: PositionOptions | undefined;
fitBoundsOptions?: FitBoundsOptions | undefined;
trackUserLocation?: boolean | undefined;
showAccuracyCircle?: boolean | undefined;
showUserLocation?: boolean | undefined;
};
position: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
}
>;
export default _default;
59 changes: 59 additions & 0 deletions types/controls/VControlNavigation.vue.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import type { PropType } from 'vue';
declare const _default: import('vue').DefineComponent<
{
options: {
type: PropType<{
showCompass?: boolean | undefined;
showZoom?: boolean | undefined;
visualizePitch?: boolean | undefined;
}>;
default: () => {};
required: true;
};
position: {
type: PropType<'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'>;
default: () => string;
required: false;
};
},
void,
unknown,
{},
{},
import('vue').ComponentOptionsMixin,
import('vue').ComponentOptionsMixin,
Record<string, any>,
string,
import('vue').VNodeProps &
import('vue').AllowedComponentProps &
import('vue').ComponentCustomProps,
Readonly<
import('vue').ExtractPropTypes<{
options: {
type: PropType<{
showCompass?: boolean | undefined;
showZoom?: boolean | undefined;
visualizePitch?: boolean | undefined;
}>;
default: () => {};
required: true;
};
position: {
type: PropType<
'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'
>;
default: () => string;
required: false;
};
}>
>,
{
options: {
showCompass?: boolean | undefined;
showZoom?: boolean | undefined;
visualizePitch?: boolean | undefined;
};
position: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
}
>;
export default _default;
56 changes: 56 additions & 0 deletions types/controls/VControlScale.vue.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import type { PropType } from 'vue';
declare const _default: import('vue').DefineComponent<
{
options: {
type: PropType<{
maxWidth?: number | undefined;
unit?: string | undefined;
}>;
default: () => {};
required: true;
};
position: {
type: PropType<'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'>;
default: () => string;
required: false;
};
},
void,
unknown,
{},
{},
import('vue').ComponentOptionsMixin,
import('vue').ComponentOptionsMixin,
Record<string, any>,
string,
import('vue').VNodeProps &
import('vue').AllowedComponentProps &
import('vue').ComponentCustomProps,
Readonly<
import('vue').ExtractPropTypes<{
options: {
type: PropType<{
maxWidth?: number | undefined;
unit?: string | undefined;
}>;
default: () => {};
required: true;
};
position: {
type: PropType<
'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'
>;
default: () => string;
required: false;
};
}>
>,
{
options: {
maxWidth?: number | undefined;
unit?: string | undefined;
};
position: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
}
>;
export default _default;
1 change: 1 addition & 0 deletions types/events/geolocate.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export declare const geolocateControlEvents: string[];
4 changes: 4 additions & 0 deletions types/events/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export { mapLayerEvents } from './layer';
export { mapEvents } from './map';
export { markerDOMEvents, markerMapEvents } from './marker';
export { popupEvents } from './popup';
3 changes: 3 additions & 0 deletions types/events/layer.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/// <reference types="@types/mapbox-gl" />
import { MapLayerEventType } from 'mapbox-gl';
export declare const mapLayerEvents: Array<keyof MapLayerEventType>;
3 changes: 3 additions & 0 deletions types/events/map.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/// <reference types="@types/mapbox-gl" />
import { MapEventType } from 'mapbox-gl';
export declare const mapEvents: Array<keyof MapEventType>;
2 changes: 2 additions & 0 deletions types/events/marker.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export declare const markerMapEvents: string[];
export declare const markerDOMEvents: string[];
1 change: 1 addition & 0 deletions types/events/popup.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export declare const popupEvents: string[];
45 changes: 31 additions & 14 deletions types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,32 @@
import Vue, { VueConstructor } from 'vue';
import VControlAttribution from './controls/VControlAttribution.vue';
import VControlFullscreen from './controls/VControlFullscreen.vue';
import VControlGeolocate from './controls/VControlGeolocate.vue';
import VControlNavigation from './controls/VControlNavigation.vue';
import VControlScale from './controls/VControlScale.vue';
import VLayerMapboxCanvas from './layers/mapbox/VLayerMapboxCanvas.vue';
import VLayerMapboxGeojson from './layers/mapbox/VLayerMapboxGeojson.vue';
import VLayerMapboxImage from './layers/mapbox/VLayerMapboxImage.vue';
import VLayerMapboxRaster from './layers/mapbox/VLayerMapboxRaster.vue';
import VLayerMapboxVector from './layers/mapbox/VLayerMapboxVector.vue';
import VLayerMapboxVideo from './layers/mapbox/VLayerMapboxVideo.vue';
import VMap from './map/VMap.vue';
import VMarker from './markers/VMarker.vue';
import VPopup from './popups/VPopup.vue';

export const MglMap: VueConstructor<Vue>;
export const MglNavigationControl: VueConstructor<Vue>;
export const MglGeolocateControl: VueConstructor<Vue>;
export const MglFullscreenControl: VueConstructor<Vue>;
export const MglAttributionControl: VueConstructor<Vue>;
export const MglScaleControl: VueConstructor<Vue>;
export const MglGeojsonLayer: VueConstructor<Vue>;
export const MglImageLayer: VueConstructor<Vue>;
export const MglVideoLayer: VueConstructor<Vue>;
export const MglVectorLayer: VueConstructor<Vue>;
export const MglRasterLayer: VueConstructor<Vue>;
export const MglMarker: VueConstructor<Vue>;
export const MglPopup: VueConstructor<Vue>;
export {
VMap,
VMarker,
VPopup,
VLayerMapboxCanvas,
VLayerMapboxGeojson,
VLayerMapboxImage,
VLayerMapboxRaster,
VLayerMapboxVector,
VLayerMapboxVideo,
VControlAttribution,
VControlFullscreen,
VControlGeolocate,
VControlNavigation,
VControlScale,
};
export default VMap;
Loading

0 comments on commit 745afee

Please sign in to comment.