question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

v6.0.0 to v6.0.1 introduces TypeScript type incompatibilities

See original GitHub issue

Description

In this change: https://github.com/Netflix/pollyjs/compare/v6.0.0...v6.0.1

The NodeHttpAdapter and FSPersister types are no longer compatible.

import NodeHttpAdapter from '@pollyjs/adapter-node-http';
import FSPersister from '@pollyjs/persister-fs';

  setupPolly({
    adapters: [NodeHttpAdapter],
    persister: FSPersister,
   ...
  });

Error Message & Stack Trace

Type 'typeof NodeHttpAdapter' is not assignable to type 'string | typeof Adapter'.
  Type 'typeof NodeHttpAdapter' is not assignable to type 'typeof Adapter'.
    Construct signature return types 'NodeHttpAdapter' and 'Adapter<TOptions, TRequest>' are incompatible.
      The types of 'defaultOptions' are incompatible between these types.
        Type '{}' is not assignable to type 'TOptions'.
          '{}' is assignable to the constraint of type 'TOptions', but 'TOptions' could be instantiated with a different subtype of constraint '{}'.ts(2322)

Environment

Node.js v14.18.1
linux 5.15.5-76051505-generic
npm: 6.14.15

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7

github_iconTop GitHub Comments

2reactions
offirgolancommented, Dec 8, 2021

@guyellis apologies for the back and forth. Can you give v6.0.3 a try?

1reaction
guyelliscommented, Dec 8, 2021

@offirgolan - yes that worked - thank you! 🥇

Read more comments on GitHub >

github_iconTop Results From Across the Web

Incorrect versions/tags on NPM and docs site? #1631 - GitHub
Properly release v6.x and tag it as latest on npm, e.g. v6.1.0 . Are there any outstanding issues / incompatibilities / tasks that...
Read more >
grunt-ts | Yarn - Package Manager
Grunt-ts is an npm package that handles TypeScript compilation work in GruntJS build scripts. This project, much like Grunt itself, is now in...
Read more >
Releases - styled-components
After an epic amount of refactoring, I'm pleased to announce the first alpha of styled-components v6! Highlights: styled-components is now written in TypeScript...
Read more >
Release Notes | Firebase - Google
The Firebase Admin Python SDK (v6.0.1) is now available. ... functions are now strongly typed, permitting stronger TypeScript types for matched parameters.
Read more >
runsa-zeromq - npm Package Health Analysis | Snyk
runsa-zeromq. v6.0.0-beta.10 ... Fully usable with TypeScript (3.6+). ... but the Guide in particular is still a good introduction to ZeroMQ for new...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found