aboutsummaryrefslogtreecommitdiff
path: root/dev
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-11-29 20:14:22 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-11-29 20:14:22 -0500
commit4a14a0ff0105bf29f2f9368f175c0c17f54a1921 (patch)
treec87e31ef0c09da653cc6bf943086600b10971665 /dev
parente215656ce9b965360e540da93ebf5c381cbe4e41 (diff)
Update manifest types
Diffstat (limited to 'dev')
-rw-r--r--dev/manifest-util.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/dev/manifest-util.js b/dev/manifest-util.js
index 1efc8cfc..638706d8 100644
--- a/dev/manifest-util.js
+++ b/dev/manifest-util.js
@@ -36,8 +36,8 @@ function clone(value) {
export class ManifestUtil {
constructor() {
const fileName = path.join(dirname, 'data', 'manifest-variants.json');
- const {manifest, variants, defaultVariant} = /** @type {import('dev/manifest').Manifest} */ (JSON.parse(fs.readFileSync(fileName, {encoding: 'utf8'})));
- /** @type {chrome.runtime.Manifest} */
+ const {manifest, variants, defaultVariant} = /** @type {import('dev/manifest').ManifestConfig} */ (JSON.parse(fs.readFileSync(fileName, {encoding: 'utf8'})));
+ /** @type {import('dev/manifest').Manifest} */
this._manifest = manifest;
/** @type {import('dev/manifest').ManifestVariant[]} */
this._variants = variants;
@@ -52,7 +52,7 @@ export class ManifestUtil {
/**
* @param {?string} [variantName]
- * @returns {chrome.runtime.Manifest}
+ * @returns {import('dev/manifest').Manifest}
*/
getManifest(variantName) {
if (typeof variantName === 'string') {
@@ -88,7 +88,7 @@ export class ManifestUtil {
}
/**
- * @param {chrome.runtime.Manifest} manifest
+ * @param {import('dev/manifest').Manifest} manifest
* @returns {string}
*/
static createManifestString(manifest) {
@@ -119,9 +119,9 @@ export class ManifestUtil {
}
/**
- * @param {chrome.runtime.Manifest} manifest
+ * @param {import('dev/manifest').Manifest} manifest
* @param {import('dev/manifest').Modification[]} modifications
- * @returns {chrome.runtime.Manifest}
+ * @returns {import('dev/manifest').Manifest}
*/
_applyModifications(manifest, modifications) {
if (Array.isArray(modifications)) {
@@ -328,9 +328,9 @@ export class ManifestUtil {
}
/**
- * @param {chrome.runtime.Manifest} manifest
+ * @param {import('dev/manifest').Manifest} manifest
* @param {import('dev/manifest').ManifestVariant} variant
- * @returns {chrome.runtime.Manifest}
+ * @returns {import('dev/manifest').Manifest}
*/
_createVariantManifest(manifest, variant) {
let modifiedManifest = clone(manifest);