mirror of
https://github.com/owntracks/frontend.git
synced 2026-08-25 20:47:16 +00:00
Remove all @typedef definitions
This commit is contained in:
+1
-7
@@ -1,12 +1,6 @@
|
||||
import { log, logLevels } from "@/logging";
|
||||
import { getApiUrl } from "@/util";
|
||||
|
||||
/** @typedef {import("./types").QueryParams} QueryParams */
|
||||
/** @typedef {import("./types").User} User */
|
||||
/** @typedef {import("./types").Device} Device */
|
||||
/** @typedef {import("./types").LastLocation} LastLocation */
|
||||
/** @typedef {import("./types").LocationHistory} LocationHistory */
|
||||
|
||||
/**
|
||||
* Callback for new WebSocket location messages.
|
||||
*
|
||||
@@ -17,7 +11,7 @@ import { getApiUrl } from "@/util";
|
||||
* Fetch an API resource.
|
||||
*
|
||||
* @param {String} path API resource path
|
||||
* @param {QueryParams} [params] Query parameters
|
||||
* @param {Object} [params] Query parameters
|
||||
* @return {Promise} Promise returned by the fetch function
|
||||
*/
|
||||
const fetchApi = (path, params = {}) => {
|
||||
|
||||
@@ -3,10 +3,6 @@ import * as api from "@/api";
|
||||
import config from "@/config";
|
||||
import { isIsoDateTime } from "@/util";
|
||||
|
||||
/** @typedef {import("./types").QueryParams} QueryParams */
|
||||
/** @typedef {import("./types").User} User */
|
||||
/** @typedef {import("./types").Device} Device */
|
||||
|
||||
/**
|
||||
* Populate the state from URL query parameters.
|
||||
*
|
||||
|
||||
@@ -3,10 +3,6 @@ import L from "leaflet";
|
||||
import config from "@/config";
|
||||
import { distanceBetweenCoordinates } from "@/util";
|
||||
|
||||
/** @typedef {import("./types").State} State */
|
||||
/** @typedef {import("./types").MultiLocationHistory} MultiLocationHistory */
|
||||
/** @typedef {import("./types").DatepickerConfig} DatepickerConfig */
|
||||
|
||||
/**
|
||||
* From the selected users' and devices' location histories, create an
|
||||
* array of all coordinates.
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
/**
|
||||
* A coordinate with latitude and longitude.
|
||||
*
|
||||
* @typedef Coordinate
|
||||
* @type {(Object|L.LatLng)}
|
||||
* @property {Number} lat Latitude
|
||||
* @property {Number} lng Longitude
|
||||
*/
|
||||
|
||||
/**
|
||||
* Vuex state.
|
||||
*
|
||||
* @typedef {Object.<String, *>} State
|
||||
*/
|
||||
|
||||
/**
|
||||
* URL query parameter object.
|
||||
*
|
||||
* @typedef {Object.<String, *>} QueryParams
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Object} DatepickerConfig
|
||||
* @property {Function} DatepickerConfig.customPredictor Custom predictor function
|
||||
*/
|
||||
|
||||
/**
|
||||
* A user's name.
|
||||
*
|
||||
* @typedef {String} User
|
||||
*/
|
||||
|
||||
/**
|
||||
* A device's name.
|
||||
*
|
||||
* @typedef {String} Device
|
||||
*/
|
||||
|
||||
/**
|
||||
* A last location object.
|
||||
*
|
||||
* @typedef {Object.<String, *>} LastLocation
|
||||
*/
|
||||
|
||||
/**
|
||||
* An array of location history objects
|
||||
*
|
||||
* @typedef {Array.<Object.<String, *>>} LocationHistory
|
||||
*/
|
||||
|
||||
/**
|
||||
* Multiple arrays of location history objects mapped to user and devices.
|
||||
*
|
||||
* @typedef {Object.<User, Object.<Device, LocationHistory>>} MultiLocationHistory
|
||||
*/
|
||||
@@ -3,8 +3,6 @@ import moment from "moment";
|
||||
import config from "@/config";
|
||||
import { DATE_TIME_FORMAT, EARTH_RADIUS_IN_KM } from "@/constants";
|
||||
|
||||
/** @typedef {import("./types").Coordinate} Coordinate */
|
||||
|
||||
/**
|
||||
* Get a complete URL for any API resource, taking the
|
||||
* base URL configuration into account.
|
||||
|
||||
Reference in New Issue
Block a user