Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose DeepReadonly<> type #1605

Closed
stefnotch opened this issue Jul 16, 2020 · 0 comments · Fixed by #1606
Closed

Expose DeepReadonly<> type #1605

stefnotch opened this issue Jul 16, 2020 · 0 comments · Fixed by #1606

Comments

@stefnotch
Copy link

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.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant