Skip to content

Add Symbol.observable to Observable interface #8

Closed
@appsforartists

Description

@appsforartists

Can't add the [$$observable] line of

export interface Observable<T> {
  subscribe(listener: Observer | Next): Subscription;
  [$$observable](): Observable<T>;
}

because $$observable throws this error:

TS1169: A computed property name in an interface must directly refer to a built-in symbol.

Symbol didn't exist until Safari 8, so using Symbol.observable rather than $$observable would affect our compatibility with Safari 8 for no user-justifiable reason.

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