Convert src/compiler/compile/render_ssr/handlers/shared/get_slot_scope.ts to JavaScript

pull/8569/head
Simon Holthausen 3 years ago
parent f57591cf06
commit 909201927f

@ -1,4 +1,4 @@
/** @param {ConstTag[]} const_tags */ /** @param {import('../../../nodes/ConstTag.js').default[]} const_tags */
export function get_const_tags(const_tags) { export function get_const_tags(const_tags) {
if (const_tags.length === 0) return null; if (const_tags.length === 0) return null;
return { return {

@ -1,9 +1,10 @@
import Let from '../../../nodes/Let'; /**
import { ObjectPattern } from 'estree'; * @param {Let[]} lets
* @returns {import("C:/repos/svelte/svelte/node_modules/.pnpm/@types+estree@1.0.0/node_modules/@types/estree/index").ObjectPattern}
export function get_slot_scope(lets: Let[]): ObjectPattern { */
if (lets.length === 0) return null; export function get_slot_scope(lets) {
if (lets.length === 0)
return null;
return { return {
type: 'ObjectPattern', type: 'ObjectPattern',
properties: lets.map((l) => { properties: lets.map((l) => {
@ -19,3 +20,7 @@ export function get_slot_scope(lets: Let[]): ObjectPattern {
}) })
}; };
} }

Loading…
Cancel
Save