Skip to content

Commit

Permalink
chore(compartment-mapper): freeze another parserForLanguage
Browse files Browse the repository at this point in the history
  • Loading branch information
boneskull committed May 30, 2024
1 parent 491a795 commit cd230cf
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions packages/compartment-mapper/src/import-archive.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,16 @@ const textDecoder = new TextDecoder();

const { freeze } = Object;

/** @satisfies {ParserForLanguage} */
const parserForLanguage = /** @type {const} */ ({
'pre-cjs-json': parserPreCjs,
'pre-mjs-json': parserPreMjs,
json: parserJson,
text: parserText,
bytes: parserBytes,
});
/** @satisfies {Readonly<ParserForLanguage>} */
const parserForLanguage = freeze(
/** @type {const} */ ({
'pre-cjs-json': parserPreCjs,
'pre-mjs-json': parserPreMjs,
json: parserJson,
text: parserText,
bytes: parserBytes,
}),
);

/**
* @param {string} errorMessage - error to throw on execute
Expand Down

0 comments on commit cd230cf

Please sign in to comment.