We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 830e6d2 commit 413e1c9Copy full SHA for 413e1c9
lib/compareLocations.js
@@ -3,6 +3,26 @@
3
Author Tobias Koppers @sokra
4
*/
5
"use strict";
6
+
7
+/**
8
+ * @typedef {Object} LineAndColumn
9
+ * @property {number=} line
10
+ * @property {number=} column
11
+ */
12
13
14
+ * @typedef {Object} NodeLocation
15
+ * @property {LineAndColumn=} start
16
+ * @property {LineAndColumn=} end
17
+ * @property {number=} index
18
19
20
21
+ * Compare two locations
22
+ * @param {string|NodeLocation} a
23
+ * @param {string|NodeLocation} b
24
+ * @returns {-1|0|1}
25
26
module.exports = (a, b) => {
27
if (typeof a === "string") {
28
if (typeof b === "string") {
0 commit comments