CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-hoist-non-react-statics

Copies non-react specific statics from a child component to a parent component

95

1.09x
Overview
Eval results
Files

task.mdevals/scenario-6/

Instrumented Wrapper Static Safety

Wrap an existing component with instrumentation while preserving descriptor-based statics and skipping read-only collisions.

Capabilities

Preserve descriptor statics

  • Wrapping a component that exposes a getter-based static keeps the property as a getter on the wrapped component and leaves it non-enumerable. @test

Ignore read-only collisions

  • The wrapper defines a non-configurable static instrumentationTag value of "instrumented" and still completes successfully when the source component declares the same static; the wrapped component retains its original tag value without throwing. @test

Implementation

@generates

API

/**
 * Wraps a base component with instrumentation while preserving descriptor-based statics.
 *
 * @param {Function|object} Component - Base component to wrap.
 * @returns {Function|object} Wrapped component that forwards invocation and retains static metadata.
 */
function wrapWithInstrumentation(Component);

Dependencies { .dependencies }

hoist-non-react-statics { .dependency }

Copies static properties between components while preserving property descriptors and skipping read-only statics.

Install with Tessl CLI

npx tessl i tessl/npm-hoist-non-react-statics

tile.json