Skip to content

tsc compilation error with @types/node 10.9.4 #35

@LCHarold

Description

@LCHarold

A project using odata-v4-server npm package and with @types/node version 10.9.4 will throw an error when compiling TypeScript:

src/lib/processor.ts:383:7 - error TS2415: Class 'ODataStreamWrapper' incorrectly extends base class 'Transform'.
  Property '_flush' is protected in type 'ODataStreamWrapper' but public in type 'Transform'.

383 class ODataStreamWrapper extends Transform {
          ~~~~~~~~~~~~~~~~~~


src/lib/processor.ts:431:14 - error TS2415: Class 'ODataProcessor' incorrectly extends base class 'Transform'.
  Property '_flush' is protected in type 'ODataProcessor' but public in type 'Transform'.

431 export class ODataProcessor extends Transform {
                 ~~~~~~~~~~~~~~

The fix is to change both _flush methods in processor.ts to public instead of protected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions