Skip to content

[bug] name is deprecated #42476

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

Closed
wenfangdu opened this issue Jan 25, 2021 · 6 comments
Closed

[bug] name is deprecated #42476

wenfangdu opened this issue Jan 25, 2021 · 6 comments
Labels
Working as Intended The behavior described is the intended behavior; this is not a bug

Comments

@wenfangdu
Copy link

wenfangdu commented Jan 25, 2021

💻 Code

image

image

🙂 Expected behavior

No warning.

@AviVahl
Copy link

AviVahl commented Jan 25, 2021

This was an intended change, I believe. See related discussion: #18433

EDIT: Oh. Perhaps this is a legitimate bug because of the destructuring...? Not sure globals should be used/picked up in that location/syntax...

@wenfangdu
Copy link
Author

@AviVahl It's actually easier to trigger... please see the newly uploaded picture.

@AviVahl
Copy link

AviVahl commented Jan 25, 2021

That's a different behavior, where a .ts file without any esm export/import statements is treated as a script. if you add export {} it would treat it as a module. Not to say that this is ideal behavior or anything.

@DanielRosenwasser DanielRosenwasser added the Working as Intended The behavior described is the intended behavior; this is not a bug label Jan 25, 2021
@DanielRosenwasser
Copy link
Member

Eventually, I assume we'll be able to look at an .mjs file and say "that's a module", but until then, this is an external behavior.

@wenfangdu
Copy link
Author

@DanielRosenwasser Just to add more info, .js is the same too:
image

@typescript-bot
Copy link
Collaborator

This issue has been marked 'Working as Intended' and has seen no recent activity. It has been automatically closed for house-keeping purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Working as Intended The behavior described is the intended behavior; this is not a bug
Projects
None yet
Development

No branches or pull requests

4 participants