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] Index signature is missing in type 'DefaultAddOptions' #66

Closed
roblav96 opened this issue May 30, 2019 · 1 comment · Fixed by #68
Closed

[TypeScript] Index signature is missing in type 'DefaultAddOptions' #66

roblav96 opened this issue May 30, 2019 · 1 comment · Fixed by #68

Comments

@roblav96
Copy link

Since upgrading typescript@3.5.1 I get this compile error:

node_modules/p-queue/index.d.ts:81:54 - error TS2344: Type 'DefaultAddOptions' does not satisfy the constraint 'QueueAddOptions'.
  Index signature is missing in type 'DefaultAddOptions'.

81  EnqueueOptionsType extends PQueue.QueueAddOptions = PQueue.DefaultAddOptions
                                                        ~~~~~~~~~~~~~~~~~~~~~~~~

My tsconfig.json looks like:

{
	"compilerOptions": {
		"lib": ["esnext"],
		"module": "commonjs",
		"target": "es5"
	}
}
@callmehiphop
Copy link
Contributor

callmehiphop commented Jun 4, 2019

I think the issue is that TypeScript@3.5 made a breaking change where

{ [k: string]: unknown } is no longer a wildcard assignment target

Their suggestion is to use any instead of unknown, which appears to fix the issue for me, but I'm not sure if that's the way to go or not.

risseraka pushed a commit to MTES-MCT/camino-api that referenced this issue Jun 19, 2019
la dernière version de typescript 3.5.1, provoque un bug
sindresorhus/p-queue#66
risseraka pushed a commit to risseraka/camino-api that referenced this issue Jun 19, 2019
la dernière version de typescript 3.5.1, provoque un bug
sindresorhus/p-queue#66
francoisromain added a commit to MTES-MCT/camino-api that referenced this issue Aug 16, 2019
la dernière version de typescript 3.5.1, provoque un bug
sindresorhus/p-queue#66
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.

2 participants