Skip to content

Commit 960fe30

Browse files
authored
chore: remove internal functions from svelte/transition exports (#10132)
* chore: remove internal functions from `svelte/transition` exports * regenerate types
1 parent 0857946 commit 960fe30

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

.changeset/lucky-toes-begin.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
chore: remove internal functions from `svelte/transition` exports

packages/svelte/src/transition/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ function cubic_out(t) {
1212
* @param {number} t
1313
* @returns {number}
1414
*/
15-
export function cubic_in_out(t) {
15+
function cubic_in_out(t) {
1616
return t < 0.5 ? 4.0 * t * t * t : 0.5 * Math.pow(2.0 * t - 2.0, 3.0) + 1.0;
1717
}
1818

1919
/** @param {number | string} value
2020
* @returns {[number, string]}
2121
*/
22-
export function split_css_unit(value) {
22+
function split_css_unit(value) {
2323
const split = typeof value === 'string' && value.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);
2424
return split ? [parseFloat(split[1]), split[2] || 'px'] : [/** @type {number} */ (value), 'px'];
2525
}

packages/svelte/types/index.d.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2079,12 +2079,6 @@ declare module 'svelte/transition' {
20792079
duration?: number | ((len: number) => number);
20802080
easing?: EasingFunction;
20812081
}
2082-
/**
2083-
* https://svelte.dev/docs/svelte-easing
2084-
* */
2085-
export function cubic_in_out(t: number): number;
2086-
2087-
export function split_css_unit(value: number | string): [number, string];
20882082
/**
20892083
* Animates a `blur` filter alongside an element's opacity.
20902084
*

0 commit comments

Comments
 (0)