Skip to content

Conversation

JoshuaKGoldberg
Copy link
Contributor

Per my interpretation of a brief discussion on alwaysStrict in Discord, changes the default value for that setting to off.

Note that this doesn't imply anything about TypeScript's recommendations around strict mode. It just changes the playground to not emit a "use strict"; on top of emitted JS. That string has been a thorn in my side trying to teach TypeScript in workshops for years.

@jakebailey
Copy link
Member

I am still not entirely convinced that this is a good idea, but, in what conditions do we currently actually emit it? The default settings on the playground don't show "use strict"; in the JS output.

@JoshuaKGoldberg
Copy link
Contributor Author

If the current file is a script (rather than a module). https://www.typescriptlang.org/play?#code/Q:

Screenshot of the TypeScript playground with no input code. The output is "use strict";

@jakebailey
Copy link
Member

Ah, I had some stuff sitting in my browser.

@jakebailey jakebailey added the deploy-preview Enables automatic deployments to preview environments on a PR label Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deploy-preview Enables automatic deployments to preview environments on a PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants