MCPcopy
hub / github.com/styletron/styletron / addDebugMetadata

Function addDebugMetadata

packages/styletron-react/src/dev-tool.ts:4–11  ·  view source on GitHub ↗
(instance, stackIndex)

Source from the content-addressed store, hash-verified

2/* global module */
3
4export function addDebugMetadata(instance, stackIndex) {
5 // @ts-expect-error todo: stacktrace does not exist on error (non standard browser?)
6 const {stack, stacktrace, message} = new Error("stacktrace source");
7 instance.debug = {
8 stackInfo: {stack, stacktrace, message},
9 stackIndex: stackIndex,
10 };
11}
12
13// DEVTOOLS SETUP
14type StyletronStyles = {

Callers 4

styledFunction · 0.90
withTransformFunction · 0.90
withStyleDeepFunction · 0.90
withWrapperFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected