tilt icon indicating copy to clipboard operation
tilt copied to clipboard

tilt api docs are missing info for v1alpha1 types

Open landism opened this issue 2 years ago • 1 comments

Expected Behavior

these docs show the fields' types

Current Behavior

the fields are described in the docs for the types' constructors (for example) but not the types

Context

I opened the api docs and cmd+f'd uitextinput and found docs that looked like they were what I wanted, but were missing the info I needed, and assumed the info I needed was just missing. (I didn't realize we had separate ctor and type docs)

landism avatar Apr 13 '22 19:04 landism

ya, i remember this, a bit of context on it:

  • Officially, starlark doesn't support user-defined classes (i.e., the class keyword)
  • All new types must be built into the runtime.
  • We model these new types as built-in dicts. Notably, they're dicts with keys, not structs with fields.
  • We might be able to handle this in the docgen with the TypedDict stuff https://docs.python.org/3/library/typing.html#typing.TypedDict
  • The starlark-native docgenerator really punts on this and kind of handles it in weird ways.

nicks avatar Apr 13 '22 21:04 nicks