Skip to content

respect pragma for imports on sort #62147

@wavim

Description

@wavim

Type: Bug

Run TypeScript: Sort Imports on

// demo.ts with deno

// @ts-types="@types/compression"
import compression from "compression";
import { join } from "@std/path";

The TS pragma would not stick to the correct import statement.

VS Code version: Code 1.102.2 (c306e94f98122556ca081f527b466015e1bc37b0, 2025-07-22T12:15:48.520Z)
OS version: Windows_NT x64 10.0.26100
Modes:

System Info
Item Value
CPUs 11th Gen Intel(R) Core(TM) i5-11320H @ 3.20GHz (8 x 3187)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 15.79GB (7.98GB free)
Process Argv --crash-reporter-id 42aa9024-3bf8-4720-adf8-4a8b3878dcaa
Screen Reader no
VM 0%
Extensions (10)
Extension Author (truncated) Version
alt-delete car 2.1.12
better-memo car 3.0.17
git-branch-master car 2.0.0
istrainless car 3.0.5
catppuccin-vsc Cat 3.17.0
catppuccin-vsc-icons Cat 1.21.0
vscode-deno den 3.45.0
prisma Pri 6.12.0
sqlite-viewer qwt 0.10.6
errorlens use 3.26.0
A/B Experiments
vsliv368:30146709
binariesv615:30325510
2e7ec940:31000449
nativeloc1:31344060
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
9064b325:31222308
copilot_t_ci:31333650
e5gg6876:31282496
pythoneinst12:31285622
c7cif404:31314491
pythonpulldiag:31343502
996jf627:31283433
pythonrdcb7:31342333
usemplatestapi:31297334
0aa6g176:31307128
747dc170:31275177
6518g693:31334701
aj953862:31281341
generatesymbolt:31295002
convertfstringf:31295003
pylancequickfixt:31350061
9d2cg352:31346308
convertlamdaf:31350062
usemarketplace:31343026
nesew2to5:31336538
agentclaude:31350858
nes-diff-11:31337487
replacestringexc:31350595
nes-set-on:31351930
testaa123:31335226
63221493:31336333
yijiwantestdri0626-t:31336930
0927b901:31350571
ji9b5146:31348712
45650338:31356125
0cj2b977:31352657

Metadata

Metadata

Assignees

No one assigned

    Labels

    Help WantedYou can do thisPossible ImprovementThe current behavior isn't wrong, but it's possible to see that it might be better in some cases

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions