winglang / wing

A programming language for the cloud ☁️ A unified programming model, combining infrastructure and runtime code into one language ⚡
https://winglang.io
Other
5.03k stars 197 forks source link

wrong signature suggestion inside incomplete `try catch` #4758

Open eladcon opened 1 year ago

eladcon commented 1 year ago

I tried this:

get signature suggestion while writing code in an incomplete try statement

bring util;
bring fs;

test "" {
  util.waitUntil(inflight () => {
    try {
      fs.readFile()

    }
  });
}

This happened:

the following suggestion

(predicate: inflight (): bool, ...props): bool
interface IPredicateHandler extends IResource

I expected this:

(filepath: str, ...options): str

Is there a workaround?

complete writing the try statement first

Component

IDE Extension

Wing Version

No response

Node.js Version

No response

Platform(s)

No response

Anything else?

No response

Community Notes

github-actions[bot] commented 10 months ago

Hi,

This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!