Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tsc compilation error with @types/node 10.9.4 #35

Open
LCHarold opened this issue Sep 5, 2018 · 3 comments · May be fixed by #36
Open

tsc compilation error with @types/node 10.9.4 #35

LCHarold opened this issue Sep 5, 2018 · 3 comments · May be fixed by #36

Comments

@LCHarold
Copy link

LCHarold commented Sep 5, 2018

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.

@ArturBaybulatov
Copy link

Related error: jaystack/odata-v4-server-pgsql-example#5

node_modules/odata-v4-server/build/lib/processor.d.ts:20:22 - error TS2415: Class 'ODataProcessor' incorrectly extends base class 'Transform'.
  Property '_flush' is protected in type 'ODataProcessor' but public in type 'Transform'.

20 export declare class ODataProcessor extends Transform {
                        ~~~~~~~~~~~~~~

@rowlanch
Copy link

rowlanch commented Nov 5, 2019

I am experiencing this issue as well. Are there plans to merge the existing PR to resolve this bug?

@antifree
Copy link

TypeScript can build project if pass option tsc --skipLibCheck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants