PromiseOr<T, sync>
Type Parameters
-
T
-
sync extends "sync" | "async"
If this is
'sync', this can only be aT. If it's'async', this can be either aTor aPromise<T>.
© 2006–2025 the Sass team, and numerous contributors
Licensed under the MIT License.
https://sass-lang.com/documentation/js-api/types/PromiseOr
A utility type for choosing between synchronous and asynchronous return values.
This is used as the return value for plugins like CustomFunction, Importer, and FileImporter so that TypeScript enforces that asynchronous plugins are only passed to compileAsync and compileStringAsync, not compile or compileString.