0

[webstorm] How to disable the behavior of changing .ts to .js on autocomplete ?

Pure TS project (without generating any .js files, which already transform by esm loader)

1
  • File | Settings | Editor | Code Style | TypeScript | Imports | Use file extension: Never Commented Apr 22, 2024 at 6:45

1 Answer 1

2

How to disable the behavior of changing .ts to .js on autocomplete in WebStorm:

  1. Go to settings
    • macOS: WebStorm > Preferences (Cmd + ,)
    • Windows/Linux: File > Settings (Ctrl + Alt + S)
  2. Adjust TypeScript Autocomplete
    • Navigate to Editor > General > Auto Import and modify settings to prevent unwanted changes from .ts to .js.
  3. Check File Associations
    • Go to Editor > File Types and ensure .ts is correctly associated under TypeScript and not JavaScript.
  4. Manage File Watchers
    • Disable any TypeScript to JavaScript conversion in Tools > File Watchers if necessary.
  5. Confirm Changes and Restart
    • Click Apply or OK, then restart WebStorm to ensure settings take effect.
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.