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

Function Component

packages/svelte/src/compiler/legacy.js:226–239  ·  view source on GitHub ↗
(node, { visit })

Source from the content-addressed store, hash-verified

224 };
225 },
226 Component(node, { visit }) {
227 return {
228 type: 'InlineComponent',
229 start: node.start,
230 end: node.end,
231 name: node.name,
232 attributes: node.attributes.map(
233 (child) => /** @type {Legacy.LegacyAttributeLike} */ (visit(child))
234 ),
235 children: node.fragment.nodes.map(
236 (child) => /** @type {Legacy.LegacyElementLike} */ (visit(child))
237 )
238 };
239 },
240 // @ts-ignore
241 ConstTag(node) {
242 if (/** @type {Legacy.LegacyConstTag} */ (node).expression !== undefined) {

Callers 1

_mountFunction · 0.50

Calls 1

visitFunction · 0.50

Tested by

no test coverage detected