-
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Description
The extension works well for any existing files (.ts, .tsx, .css etc), but if you use CMD+N to create a new file (or double click on the tab bar), and create a new file (prior to saving it), even if VS Code detects the file as TypeScript (as you e.g. paste a type), or if you manually select the TypeScript language on the dropdown, the extension doesn't work.
Steps to reproduce
- CMD+N to create a new file
- Copy and paste the code below:
type MyType { n: number; s: string; }
- If you have auto-detection enabled, VS Code will detect the file as TypeScript. If not, you can manually go to the dropdown at the bottom and select TypeScript.
- Right-click and select "Format Document"
Expected
The file is formatted.
Actual
This message is displayed saying that OXC cannot format TypeScript files.
Also, if you select "Format Document with…" instead, OXC won't be one of the options.
Once you save the file as e.g. types.ts, then you can use the extension as normal.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels