Skip to content

TypeScript typings: Separate writable computed. #2482

@alireza-salemian

Description

@alireza-salemian

I think it's better to separate the definitions for read-only computed and writable computed.

export interface ReadonlyComputed<T = any> extends ComputedFunctions<T> {
    (): T;
}

export interface WriteableComputed<T = any> extends ReadonlyComputed<T> {
    (): T;
    (value: T): this;
}
   
export interface ReadonlyPureComputed<T = any> extends ReadonlyComputed<T> { } 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions