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

Playground: ATA not working correctly for JS files #2872

Closed
burtek opened this issue Jun 30, 2023 · 3 comments
Closed

Playground: ATA not working correctly for JS files #2872

burtek opened this issue Jun 30, 2023 · 3 comments

Comments

@burtek
Copy link

burtek commented Jun 30, 2023

Page URL: https://www.typescriptlang.org/play?filetype=js#code/PQKhAIAEGcEMBcCW0BmiCm1wG9EFsAHAewCd4AKAckwBtEA7eAWgBN0170mBjI+tAOaUAlADoAYjQQBRAMoAZBvADCfQQG0AugF9wIYAChe9aPHCxwAXnBaDQA

Issue: With ATA enabled, in playground set to JS type, types for packages are not acquired.

image

import ('eslint-define-config') works correctly in TS files

@orta
Copy link
Contributor

orta commented Jun 30, 2023

I think the ATA code will only work with top level imports, instead of inline imports in comments as it uses the typescript compiler API to grab imports - additional code would be needed to grab imports referenced via import types. It should be fine in a JS playground using import though

@burtek
Copy link
Author

burtek commented Jun 30, 2023

By top level imports do you mean import x from y? Or anything that's not JSDoc?

The below works fine, so I'd expect jsdoc comment to also work... 🤔

const a = [] satisfies import('eslint-define-config').FlatESLintConfig[];

@jakebailey
Copy link
Member

You must have deleted the template; per #2804, we're not accepting issues that aren't critical (totally broken page, malicious links, accessiblity, etc). We'd accept a PR to fix this up, but at the moment we're not tracking issues besides critical ones.

@jakebailey jakebailey closed this as not planned Won't fix, can't repro, duplicate, stale Jul 9, 2023
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

No branches or pull requests

3 participants