@@ -888,6 +888,8 @@ const NO_NODE = /** @type {Node} */ (/** @type {Node | null} */ (null));
888888 * @property {(self: Node) => boolean} usesArguments whether a function reads `arguments`
889889 * @property {(self: Node, name: string) => Node} wrapCommonjs the toplevel wrapped as a CommonJS module
890890 * @property {(self: Node, argsValues: boolean | string) => Node} wrapEnclose the toplevel wrapped in a function called at once
891+ * @property {(self: Node) => Node} wrapFunctionBody a function's body, read as a toplevel, wrapped back in a function
892+ * @property {(self: Node) => Node} unwrapFunctionBody the toplevel `wrapFunctionBody` answered, holding that function's body again
891893 * @property {(self: Node) => Node[]} argsAsNames the names a function's parameters bind
892894 * @property {(self: Node) => Node | false | undefined} isBraceless the expression an arrow's body is, where it has no braces
893895 * @property {(self: Node) => number} lengthProperty a function's `length`
@@ -3516,7 +3518,7 @@ const installNodes = (modules) => {
35163518 self,
35173519 createWalker((/** @type {Node} */ node) => {
35183520 if (isSymbolRefNode(node) || isSymbolDeclarationNode(node)) {
3519- const runs = /** @type {string} */ ( node.name) .match(/_+/g);
3521+ const runs = node.name.match(/_+/g);
35203522 if (runs !== null) {
35213523 for (const run of runs) longest = Math.max(longest, run.length);
35223524 }
@@ -9720,7 +9722,10 @@ const installMinify = (modules) => {
97209722 setShorthand("warnings", options, ["compress"]);
97219723 // The function a body is compressed in is the one statement kept.
97229724 if (functionBody && options.compress) {
9723- options.compress = { ...options.compress, toplevel: false };
9725+ options.compress = {
9726+ .../** @type {Partial<CompressOptions>} */ (options.compress),
9727+ toplevel: false
9728+ };
97249729 }
97259730 /** @type {string[] | undefined} */
97269731 let quotedProperties;
0 commit comments