-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Closed
Description
What problem does this feature solve?
Currently it's not possible to create an accurate interface for a composition function that returns a readonly(someObject)
.
For example
interface QuantumDocument {
documentState: ???
}
function useQuantumDocument(): QuantumDocument {
const documentState = reactive({ });
// code code code
return {
documentState: readonly(documentState) // return a readonly version of it
}
}
What does the proposed API look like?
I propose simply exposing the DeepReadonly<T>
type.
Metadata
Metadata
Assignees
Labels
No labels