Skip to content

Expose DeepReadonly<> type #1605

@stefnotch

Description

@stefnotch

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions