microsoft / typespec

https://typespec.io/
MIT License
4.3k stars 199 forks source link

add helpful hints in error message if unknown decorator #1773

Open iscai-msft opened 1 year ago

iscai-msft commented 1 year ago

I think it would be helpful when you get "Unknown identifier" / "Unknown decorator" errors to include a line like "make sure you're using the libraries you need to use" or something along those lines, to point people to either adding a using statement, or fully qualifying their identifier / decorator

timotheeguerin commented 1 year ago

Wonder if the solution here is just adding the quick fix option to resolve it for you. Typescript doesn't really give you more info but they do have the quick fix

image image
iscai-msft commented 1 year ago

oh yeah that's even better!