MCPcopy
hub / github.com/sveltejs/svelte / StyleDirective

Function StyleDirective

packages/svelte/src/compiler/legacy.js:448–461  ·  view source on GitHub ↗
(node, { visit, next, path })

Source from the content-addressed store, hash-verified

446 }
447 },
448 StyleDirective(node, { visit, next, path }) {
449 if (node.value !== true && !Array.isArray(node.value)) {
450 path.push(node);
451 const value = /** @type {Legacy.LegacyStyleDirective['value']} */ ([visit(node.value)]);
452 path.pop();
453
454 return {
455 ...node,
456 value
457 };
458 } else {
459 return next();
460 }
461 },
462 SpreadAttribute(node) {
463 return { ...node, type: 'Spread' };
464 },

Callers

nothing calls this directly

Calls 4

pushMethod · 0.80
popMethod · 0.80
visitFunction · 0.50
nextFunction · 0.50

Tested by

no test coverage detected