Type graph: hide library types and show where a type comes from - #11810
Type graph: hide library types and show where a type comes from#11810Timothee Guerin (timotheeguerin) wants to merge 1 commit into
Conversation
commit: |
|
All changed packages have been documented.
Show changes
|
|
You can try these changes here
|
Hide the compiler and library types behind a toolbar toggle, and show where a type is declared and let the host reveal it in its editor. Fixes Azure/typespec-azure#1904
111b7a5 to
70cf8df
Compare
The type graph opens on a wall of
TypeSpec,Reflection,Http,Azure.*… namespaces, and your own service is one line lost in the middle. Once you find a type there is also no way to tell where it came from, or to get back to it in the editor.Fixes Azure/typespec-azure#1904
defaultOnlyProjectCodeprop for hosts that want everything). Navigating to a hidden type — a link,⌘⇧F, or a sharedtype-graph:path— still shows it, with a slim notice that the tree is not listing it, rather than a dead end.Your code main.tsp:5,@typespec/http lib/main.tsp:51,Standard library. In the playground, clicking that badge on your own types selects the declaration in the editor (newonRevealSourceprop onTypeGraph, wired by the playground to Monaco).