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

error TS2440: Import declaration conflicts with local declaration of 'SoapClient'. #57

Open
kolarski opened this issue Feb 25, 2023 · 2 comments

Comments

@kolarski
Copy link

Building the client, it produces an error:

$ tsc
src/client/soap/client.ts(1,10): error TS2440: Import declaration conflicts with local declaration of 'SoapClient'.

In client.ts there is a line

export interface SoapClient extends SoapClient {

obviously a class cannot extend itself,

an easy fix will be to change the import statement to:

import { Client as SoapClientBase, createClientAsync as soapCreateClientAsync } from "soap";

and then use it like so:

export interface SoapClient extends SoapClientBase {

Is there something I might be missing here, or is it a bug ?

@kolarski
Copy link
Author

kolarski commented Feb 25, 2023

Ah, I figured it out! I was using a file named: soap.wsdl file, which generated SoapClient which happens to match the default SoapClient.

Renaming the file soap.wsdl to something else resolved the issue, but it should be nice to have a check or warning for this in the generator.

I think this issue can be closed now.

@peterarusanoff
Copy link

I had a similar issue with a number in my wsdl file name and that caused a bunch of issues

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