Skip to content

Commit 0b18d81

Browse files
committed
simplify
1 parent a3aa4f3 commit 0b18d81

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/svelte/src/internal/client/runtime.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ function process_effects(effect) {
820820
* Returns void if no callback is provided, otherwise returns the result of calling the callback.
821821
* @template [T=void]
822822
* @param {(() => T) | undefined} [fn]
823-
* @returns {T extends void ? void : T}
823+
* @returns {T}
824824
*/
825825
export function flushSync(fn) {
826826
var result;
@@ -839,7 +839,7 @@ export function flushSync(fn) {
839839
flush_tasks();
840840
}
841841

842-
return /** @type {T extends void ? void : T} */ (result);
842+
return /** @type {T} */ (result);
843843
}
844844

845845
/**

packages/svelte/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ declare module 'svelte' {
421421
* Synchronously flush any pending updates.
422422
* Returns void if no callback is provided, otherwise returns the result of calling the callback.
423423
* */
424-
export function flushSync<T = void>(fn?: (() => T) | undefined): T extends void ? void : T;
424+
export function flushSync<T = void>(fn?: (() => T) | undefined): T;
425425
/**
426426
* Returns a promise that resolves once any pending state changes have been applied.
427427
* */

0 commit comments

Comments
 (0)