MCPcopy Create free account
hub / github.com/Snowflyt/tinyeffect / renameFunction

Function renameFunction

src/effected.ts:2879–2885  ·  view source on GitHub ↗
(fn: F, name: string)

Source from the content-addressed store, hash-verified

2877 * @returns
2878 */
2879const renameFunction = <F extends (...args: never) => unknown>(fn: F, name: string): F =>
2880 Object.defineProperty(fn, "name", {
2881 value: name,
2882 writable: false,
2883 enumerable: false,
2884 configurable: true,
2885 });
2886
2887const buildErrorClass = (name: string) => {
2888 const ErrorClass = class extends Error {};

Callers 3

effectFunction · 0.85
errorFunction · 0.85
dependencyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected