MCPcopy Create free account
hub / github.com/callstack/linaria / isStaticStyledValue

Function isStaticStyledValue

packages/react/src/processors/styled.ts:109–124  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

107const staticClassSelector = (className: string): string => `.${className}`;
108
109const isStaticStyledValue = (value: unknown): value is StaticStyledValue => {
110 if (typeof value !== 'object' || value === null) {
111 return false;
112 }
113
114 const meta = (value as { __wyw_meta?: unknown }).__wyw_meta;
115 return (
116 typeof meta === 'object' &&
117 meta !== null &&
118 typeof (meta as { className?: unknown }).className === 'string' &&
119 ('extends' in meta
120 ? (meta as { extends?: unknown }).extends === null ||
121 isStaticStyledValue((meta as { extends?: unknown }).extends)
122 : false)
123 );
124};
125
126const staticStyledValueFromProcessorValue = (
127 value: StaticProcessorValue

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…