chore: remove internal functions from `svelte/transition` exports (#10132)

* chore: remove internal functions from `svelte/transition` exports

* regenerate types
pull/10138/head
brunnerh 12 months ago committed by GitHub
parent 08579461b1
commit 960fe308a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,5 @@
---
'svelte': patch
---
chore: remove internal functions from `svelte/transition` exports

@ -12,14 +12,14 @@ function cubic_out(t) {
* @param {number} t
* @returns {number}
*/
export function cubic_in_out(t) {
function cubic_in_out(t) {
return t < 0.5 ? 4.0 * t * t * t : 0.5 * Math.pow(2.0 * t - 2.0, 3.0) + 1.0;
}
/** @param {number | string} value
* @returns {[number, string]}
*/
export function split_css_unit(value) {
function split_css_unit(value) {
const split = typeof value === 'string' && value.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);
return split ? [parseFloat(split[1]), split[2] || 'px'] : [/** @type {number} */ (value), 'px'];
}

@ -2079,12 +2079,6 @@ declare module 'svelte/transition' {
duration?: number | ((len: number) => number);
easing?: EasingFunction;
}
/**
* https://svelte.dev/docs/svelte-easing
* */
export function cubic_in_out(t: number): number;
export function split_css_unit(value: number | string): [number, string];
/**
* Animates a `blur` filter alongside an element's opacity.
*

Loading…
Cancel
Save