File tree Expand file tree Collapse file tree 4 files changed +34
-2
lines changed Expand file tree Collapse file tree 4 files changed +34
-2
lines changed Original file line number Diff line number Diff line change 1717 }
1818 ],
1919 "semi": ["error", "always"],
20- "no-debugger": ["error"]
20+ "no-debugger": ["error"],
21+ "jsdoc/no-types": "off",
22+ "jsdoc/require-param-type": "off",
23+ "jsdoc/require-returns-type": "off"
2124 },
25+ "extends": [
26+ "plugin:jsdoc/recommended"
27+ ],
2228 "parser": "@typescript-eslint/parser",
2329 "plugins": [
2430 "@typescript-eslint",
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ class WebExtStore implements Store {
4444 *
4545 * @param index The index to the given entry on the storage.
4646 *
47- * @return The query object.
47+ * @returns The query object.
4848 */
4949 private _buildQuery ( index : StorageIndex ) : WebExtStoreQuery {
5050 let partialQuery = null ;
Original file line number Diff line number Diff line change 22 * License, v. 2.0. If a copy of the MPL was not distributed with this
33 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
44
5+ /**
6+ * Checks whether or not `v` is a simple data object.
7+ *
8+ * @param v The value to verify.
9+ *
10+ * @returns A special Typescript value (which compiles down to a boolean)
11+ * stating wether `v` is a valid data object.
12+ */
513export function isObject ( v : unknown ) : v is Record < string | number | symbol , unknown > {
614 return ( v && typeof v === "object" && v . constructor === Object ) ;
715}
816
17+ /**
18+ * Checks whether or not `v` is undefined.
19+ *
20+ * @param v The value to verify.
21+ *
22+ * @returns A special Typescript value (which compiles down to a boolean)
23+ * stating wether `v` is undefined.
24+ */
925export function isUndefined ( v : unknown ) : v is undefined {
1026 return typeof v === "undefined" ;
1127}
1228
29+ /**
30+ * Checks whether or not `v` is a string.
31+ *
32+ * @param v The value to verify.
33+ *
34+ * @returns A special Typescript value (which compiles down to a boolean)
35+ * stating wether `v` is a string.
36+ */
1337export function isString ( v : unknown ) : v is string {
1438 return ( v && ( typeof v === "string" || ( v === "object" && v . constructor === String ) ) ) ;
1539}
Original file line number Diff line number Diff line change @@ -65,6 +65,8 @@ export async function setupFirefox(headless: boolean): Promise<WebDriver> {
6565 * @param browser A Webdriver where we will run this proxied script
6666 * @param method The method which we want to execute.
6767 * This array will work exactly like the StorageIndex.
68+ *
69+ * @returns A proxy function for the given browser method.
6870 */
6971export function webExtensionAPIProxyBuilder ( browser : WebDriver , method : string [ ] ) {
7072 return async function ( ...args : never [ ] ) : Promise < any > {
You can’t perform that action at this time.
0 commit comments