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

DOM.AsyncIterable not recognized as a valid lib #58834

Closed
thomas-darling opened this issue Jun 12, 2024 · 5 comments
Closed

DOM.AsyncIterable not recognized as a valid lib #58834

thomas-darling opened this issue Jun 12, 2024 · 5 comments
Labels
External Relates to another program, environment, or user action which we cannot control.

Comments

@thomas-darling
Copy link

πŸ”Ž Search Terms

dom.asynciterable lib

πŸ•— Version & Regression Information

⏯ Playground Link

No response

πŸ’» Code

My tsconfig.json file, as I wanted it to look:

{
  "compilerOptions": {
    "lib": [
      "ES2022",
      "WebWorker.ImportScripts",
      "DOM",
      "DOM.Iterable",
      "DOM.AsyncIterable" // This is not recognized as a valid lib
    ],
    "module": "ES2022",
    "target": "ES2022",
    etc...
  }
  etc...
}

πŸ™ Actual behavior

This line in es2022.full.d.ts indicates there should be a lib named DOM.AsyncIterable - but when I try to add that to my own set of libs in my tsconfig.json file, it says no such lib exists.

πŸ™‚ Expected behavior

I was under the impression that all the libs referenced in those *.full.d.ts files should also be available for use individually - meaning that I should be able to specify DOM.AsyncIterable as a lib in my tsconfig.json file.

Additional information about the issue

The documentation for libs in general is extremely lacking, and really needs to be improved.

@fatcerberus
Copy link

Just to be clear, is this a full-on compile-time error, or is it only your IDE (VSCode?) saying it’s not valid? Because if it’s the latter then it would just mean the JSON schema VSCode is using hasn’t been updated yet.

@thomas-darling
Copy link
Author

thomas-darling commented Jun 12, 2024

It's both, actually - and it's a little weird.
Scratch that - it actually appears to be only a schema violation:

image Β 

The compile-time errors I thought were caused by this, actually seem to be intermittent - can't quite pin down when exactly they occur, but they seem to be related to editing of tsconfig in general, not just that one lib, and they seem to go away if I build a second time. That's super weird, but seems to be unrelated to this issue... maybe a bug in Webpack, or in the ts compiler, if that does any kind of persistent caching.

@fatcerberus
Copy link

Those errors are definitely bizarre, but it looks like they're all coming up while running TSLint; TSLint has been deprecated since 2019; I expect the TS devs would tell you that it's not officially supported and you should have switched to ESLint by now.

https://palantir.github.io/tslint/

⚠️ TSLint has been deprecated as of 2019. Please see this issue for more details: Roadmap: TSLint β†’ ESLint. typescript-eslint is now your best option for linting TypeScript.

@thomas-darling
Copy link
Author

thomas-darling commented Jun 12, 2024

Sorry, I just updated my comment - seems the errors are something else.
As for tslint - yeah, I need to migrate away from that, but that's not running as part of the build, so that's not the cause.

@RyanCavanaugh
Copy link
Member

Opened SchemaStore/schemastore#3858

@RyanCavanaugh RyanCavanaugh added the External Relates to another program, environment, or user action which we cannot control. label Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
External Relates to another program, environment, or user action which we cannot control.
Projects
None yet
Development

No branches or pull requests

3 participants