f80a7189a0
* chore(fe2): upgrade to nuxt 3.8.2 * fix tailwind-theme build * readme update * removing storybook from fe2 :( * fix(fe2): codegen schema url resolution
30 lines
957 B
TypeScript
30 lines
957 B
TypeScript
import { writableAsyncComputed as originalWritableAsyncComputed } from '@speckle/ui-components'
|
|
import type {
|
|
AsyncWritableComputedOptions,
|
|
AsyncWritableComputedRef
|
|
} from '@speckle/ui-components'
|
|
|
|
export type { AsyncWritableComputedOptions, AsyncWritableComputedRef }
|
|
|
|
/**
|
|
* Allows async read/write from/to computed. Use `res.value` to read and `res.update` to write. If you only need
|
|
* the computed to be read-only then use vueuse's `computedAsync`. If you only need async writes you can
|
|
* disable async reads through the `asyncRead` param.
|
|
* @param params
|
|
*/
|
|
export const writableAsyncComputed: typeof originalWritableAsyncComputed = (params) => {
|
|
const logger = useLogger()
|
|
return originalWritableAsyncComputed({
|
|
...params,
|
|
debugging: params.debugging?.log
|
|
? {
|
|
...params.debugging,
|
|
log: {
|
|
...params.debugging.log,
|
|
logger: logger.debug
|
|
}
|
|
}
|
|
: undefined
|
|
})
|
|
}
|