Skip to content

Commit

Permalink
Add "pure function" marker to entire module
Browse files Browse the repository at this point in the history
/* @__PURE__ */ can only be applied to function calls, not function declarations
  • Loading branch information
fregante committed Dec 11, 2024
1 parent 582664e commit 12140cf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ function getManifest(_version?: 2 | 3): chrome.runtime.Manifest | undefined {
return globalThis.chrome?.runtime?.getManifest?.();
}

/* @__PURE__ */
function once(function_: () => boolean): () => boolean {
let result: boolean;
return () => {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"funding": "https://github.com/sponsors/fregante",
"license": "MIT",
"author": "Federico Brigante <me@fregante.com> (https://fregante.com)",
"sideEffects": false,
"type": "module",
"exports": "./index.js",
"types": "./index.d.ts",
Expand Down

0 comments on commit 12140cf

Please sign in to comment.