Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 311x 311x 311x 4x 4x 4x 4x 4x 311x | import { render_effect } from '../../../reactivity/effects.js'; import { get_descriptor } from '../../../utils.js'; /** * Makes an `export`ed (non-prop) variable available on the `$$props` object * so that consumers can do `bind:x` on the component. * @template V * @param {Record<string, unknown>} props * @param {string} prop * @param {V} value * @returns {void} */ export function bind_prop(props, prop, value) { var desc = get_descriptor(props, prop); if (desc && desc.set) { props[prop] = value; render_effect(() => () => { props[prop] = null; }); } } |