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

TypeScript Compile Error #785

Closed
seang96 opened this issue May 18, 2020 · 4 comments
Closed

TypeScript Compile Error #785

seang96 opened this issue May 18, 2020 · 4 comments

Comments

@seang96
Copy link

seang96 commented May 18, 2020

Current behavior

Building with TypeScript on a version > 2.5.1.

Describe the bug
Fail to compile due to typescript files in node-opcua-factory failing my tsconfig checks.

node_modules/node-opcua-factory/source/factories_baseobject.ts:288:29 - error TS7018: Object literal's property 'lines' implicitly has an 'any[]' type.

288                             lines: [],
                                ~~~~~~~~~

node_modules/node-opcua-factory/source/factories_baseobject.ts:306:58 - error TS7018: Object literal's property 'lines' implicitly has an 'any[]' type.

306                 const data1 = { padding: padding + "  ", lines: [] };

See issue: microsoft/TypeScript#15363

To Reproduce
Steps to reproduce the behavior:

  1. Install node-opcua on latest version
  2. Build with Typescript

Expected behavior
Build succeeds

Screenshots
If applicable, add screenshots to help explain your problem.

Gist
gist:

  • (* ) my request is related to node-opcua acting as a OPCUA CLIENT

  • ( ) my request is related to node-opcua acting as a OPCUA SERVER

  • ( ) I have installed node-opcua from source ( using git clone)

  • (* ) I have installed node-opcua as a package ( using npm install )

  • ( ) I am using an application that uses node-opcua

    • ( ) node-red
    • ( ) other : please specify
  • Device: Laptop

  • OS version:

    • (x) Windows : version : 10 (2004)
    • ( ) Linux : version : _________
    • ( ) MacOs : version : _________
    • ( ) Raspbian: version : _________
    • ( ) Other : specify :
  • Description of the other OPCUA system I am trying to connect to:

    • Name:N/A
    • Version:N/A
    • Manufacturer/Software vendor:N/A
    • link : N/A
  • node-opcua version: :2.5.12

  • Node:
    node --version =v12.16.3
@erossignon
Copy link
Member

Yep, new type checked introduced by the most recent version of TypeScript 3.9.
Please use typescript 3.8 while we're fixing this in future version. this is wip

@seang96
Copy link
Author

seang96 commented May 18, 2020

@erossignon, I attempted to compile using 3.8 and 3.7.2 both of which still have the same error.

@erossignon
Copy link
Member

@seang96 , can you share your tsconfig ?
it might require some adjustement

@erossignon
Copy link
Member

related to #766

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

No branches or pull requests

2 participants