Skip to content

Type Definitions are empty for "add" modules #1010

@robwormald

Description

@robwormald

The generated d.ts files that correspond to the "patch" operator and observable files are empty, so they are picked up by typescript as invalid modules and the compiler errors:

error TS2656: 
Exported external package typings file 'node_modules/rxjs/add/observable/fromEvent.d.ts' is not a module. Please contact the package author to update the package definition.

This means TS users are unable to do the desired 'import rxjs/add/operator/map' use case.

Workaround for angular2 users discovering this issue is to simply 'import rxjs/Rx' which will add all the operators and observables in the meantime without error.

This appears to go all the way back to alpha.11, which is when the /add syntax was introduced.

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