Typescript suggestions based on defined types not working

Describe the Bug

this.user.positions has the type Position. Position is defined in declarations.d.ts as a global type (as are most of my types). If I type:

 this.user.positions.push({
[start typing here/press ctrl-space to bring up suggestions]
})

I do not get suggestions based on the Position type. I also do not get AI multi-line completions that are based on the defined type. Not getting them in the manually brought up suggestions window is something I’ve noticed for a while, but not getting good AI completions is new.

Steps to Reproduce

  1. Define an object type in a global declarations file, e.g. /src/declarations.d.ts:
declare global {
	type Position = {
            symbol: string
            ...
         }
         type User = {
               positions: Position[]
         }
}
  1. Add:
    "files": ["./src/declarations.d.ts"]
    to tsconfig.json
  2. In any .ts file:
let user: User = {
       positions: [{
             [try suggestions/completions here...they are wrong for me]
}]

Expected Behavior

I expect for both the suggestions window that’s brought up manually by ctrl-space (for me) and for the more complete/multi-line AI completions to be based on the defined type.

Operating System

Linux

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.2.1
VSCode Version: 1.99.3
Commit: 031e7e0ff1e2eda9c1a0f5df67d44053b059c5d0
Date: 2025-07-03T06:13:13.763Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Linux x64 6.14.0-23-generic

Does this stop you from using Cursor

No - Cursor works, but with this issue

Yes, I’ve restarted the IDE and still have the issue.

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.