pnpm run format

pull/16485/head
Nathan Shively-Sanders 2 months ago
parent f8bf2826ab
commit 84b50a6468

@ -26,9 +26,11 @@ await createBundle({
// so that types/properties with `@internal` (and its dependencies) are removed from the output
stripInternal: true,
paths: Object.fromEntries(
Object.entries(pkg.imports).map(/** @param {[string,any]} import */([key, value]) => {
Object.entries(pkg.imports).map(
/** @param {[string,any]} import */ ([key, value]) => {
return [key, [value.types ?? value.default ?? value]];
})
}
)
)
},
modules: {

@ -55,7 +55,9 @@ export function convert(source, ast) {
// Insert svelte:options back into the root nodes
if (/** @type {any} */ (options)?.__raw__) {
let idx = node.fragment.nodes.findIndex((node) => /** @type {any} */ (options).end <= node.start);
let idx = node.fragment.nodes.findIndex(
(node) => /** @type {any} */ (options).end <= node.start
);
if (idx === -1) {
idx = node.fragment.nodes.length;
}

@ -3,7 +3,7 @@
/** @type {Equals} */
export const equals = function (value) {
return value === this.v;
}
};
/**
* @param {unknown} a
@ -28,4 +28,4 @@ export function not_equal(a, b) {
/** @type {Equals} */
export const safe_equals = function (value) {
return !safe_not_equal(value, this.v);
}
};

@ -361,7 +361,8 @@ export function prop(props, key, flags, fallback) {
// means we can just call `$$props.foo = value` directly
if (setter) {
var legacy_parent = props.$$legacy;
return /** @type {() => V} */ (function (/** @type {V} */ value, /** @type {boolean} */ mutation) {
return /** @type {() => V} */ (
function (/** @type {V} */ value, /** @type {boolean} */ mutation) {
if (arguments.length > 0) {
// We don't want to notify if the value was mutated and the parent is in runes mode.
// In that case the state proxy (if it exists) should take care of the notification.
@ -375,7 +376,8 @@ export function prop(props, key, flags, fallback) {
}
return getter();
});
}
);
}
// Either prop is written to, but there's no binding, which means we
@ -398,7 +400,8 @@ export function prop(props, key, flags, fallback) {
var parent_effect = /** @type {Effect} */ (active_effect);
return /** @type {() => V} */(function (/** @type {any} */ value, /** @type {boolean} */ mutation) {
return /** @type {() => V} */ (
function (/** @type {any} */ value, /** @type {boolean} */ mutation) {
if (arguments.length > 0) {
const new_value = mutation ? get(d) : runes && bindable ? proxy(value) : value;
@ -422,5 +425,6 @@ export function prop(props, key, flags, fallback) {
}
return get(d);
});
}
);
}

@ -6,8 +6,12 @@ export class HeadPayload {
uid = () => '';
title = '';
constructor(/** @type {Set<{ hash: string; code: string }>} */ css = new Set(), /** @type {string[]} */ out = [], title = '', uid = () => '') {
constructor(
/** @type {Set<{ hash: string; code: string }>} */ css = new Set(),
/** @type {string[]} */ out = [],
title = '',
uid = () => ''
) {
this.css = css;
this.out = out;
this.title = title;

@ -88,9 +88,11 @@ function normalize_html(window, html) {
/** @param {any} node */
function normalize_children(node) {
// sort attributes
const attributes = Array.from(node.attributes).sort((/** @type {any} */ a,/** @type {any} */ b) => {
const attributes = Array.from(node.attributes).sort(
(/** @type {any} */ a, /** @type {any} */ b) => {
return a.name < b.name ? -1 : 1;
});
}
);
attributes.forEach((/** @type{any} */ attr) => {
node.removeAttribute(attr.name);

Loading…
Cancel
Save