Skip to content

http/https plugins are not compatible to @types/node 12.12.8 #541

@Flarna

Description

@Flarna

What version of OpenTelemetry are you using?

Latest master

What version of Node are you using?

12.13.0

What did you do?

Compile the code in opentelemetry-js repo

What did you expect to see?

No compile errors.

What did you see instead?

compile errors, see e.g. https://circleci.com/gh/open-telemetry/opentelemetry-js/8436?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link

src/http.ts:343:15 - error TS2345: Argument of type 'UrlWithStringQuery | null' is not assignable to parameter of type 'RequestOptions | (RequestOptions & Partial<UrlWithParsedQuery>) | null'.
  Type 'UrlWithStringQuery' is not assignable to type 'RequestOptions | (RequestOptions & Partial<UrlWithParsedQuery>) | null'.
    Type 'UrlWithStringQuery' is not assignable to type 'RequestOptions & Partial<UrlWithParsedQuery>'.
      Type 'UrlWithStringQuery' is not assignable to type 'RequestOptions'.
        Types of property 'protocol' are incompatible.
          Type 'string | null' is not assignable to type 'string | undefined'.
            Type 'null' is not assignable to type 'string | undefined'.

Additional context

@types/node version 12.12.8 had changes in url typings. see DefinitelyTyped/DefinitelyTyped#40118

Most issues are addressed by DefinitelyTyped/DefinitelyTyped#40430

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions