Skip to content

Add code 2561 to known errors - #205

Merged
sindresorhus merged 1 commit into
tsdjs:mainfrom
vkarpov15:vkarpov15/add-code
Jan 3, 2024
Merged

sindresorhus merged 1 commit into
tsdjs:mainfrom
vkarpov15:vkarpov15/add-code

Conversation

@vkarpov15

Copy link
Copy Markdown
Contributor

Followup to #202 and #204. After upgrading in Automattic/mongoose#14221 to tsd@0.30, I started getting the following errors:

  test/types/base.test.ts:61:29
  ✖   61:2   Found an error that tsd does not currently support (ts2353), consider creating an issue on GitHub.                                                                                                                                                                                                                                                               
  ✖   61:29  Object literal may only specify known properties, and invalid does not exist in type { allowDiskUse?: boolean | undefined; applyPluginsToChildSchemas?: boolean | undefined; applyPluginsToDiscriminators?: boolean | undefined; autoCreate?: boolean | undefined; autoIndex?: boolean | undefined; ... 21 more ...; translateAliases?: boolean | undefined; }.  

  test/types/models.test.ts:350:10
  ✖  346:2   Found an error that tsd does not currently support (ts2561), consider creating an issue on GitHub.                                                                                                                                                                                                                                                               
  ✖  350:10  Object literal may only specify known properties, but test does not exist in type OptionalId<{ testy: string; }>. Did you mean to write testy?                                                                                                                                                                                                                   

  4 errors

Why is 2561 a separate diagnostic code from 2353 even though the error message only differs "and" -> "but"? No idea. But this seems to fix the issue. I'm also open to suggestions for a better name than ObjectLiteralMayOnlySpecifyKnownProperties2.

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 this pull request may close these issues.

2 participants