This commit adds type information to multiple default_config attributes.
This enables removing the "permitted values" bit in some of the comments
as TypeDoc displays type information when available.
This commit turns default_config into a class. This is useful because
TypeDoc's layout for classes is better than the one for object literals.
On top of that, default_config being a class will help with adding type
information to settings, which will in turn let us generate config
metadata that we will then be able to use to typecheck `:set` and to
provide more information in completions.
When switching to or from a tab, Tridactyl sends a message to the
previously and newly-active tabs in order to trigger the TabLeft and
TabEnter autocommands.
This didn't work with privileged tabs as these tabs do not have a
content script. Instead, an exception was thrown. This commit adds
exception handling for these exceptions.
This commit makes type information generated by our compiler pass more
precise. This lets us choose what information we want to display in the
command line.
As mentioned in https://github.com/cmcaine/tridactyl/issues/912, there
was a problem with aliases preventing some excmd completion options from
being displayed. For example, `b` would be expanded to `buffer` in the
command line completion mechanism and thus prevent `back` from being
displayed.
This commit fixes that by treating aliases as "real" excmds when
building completion sources. Basically, we check for aliases to the
prefixes given as CompletionSource parameter and add them to the list of
prefixes that can trigger the completion source.
We use this opportunity to remove the constraint of having to add a
space to each prefix, they're instead automatically added by the
CompletionSource constructor.
Rapid hinting now returns an array. When no hints have been selected, an
empty array is returned. When no hints have been selected in regular
hinting mode, an empty string is returned.
This commit removes the try/catch in the excmd completion source and
instead makes the ExcmdCompletionOption constructor default to a string
for missing values.
This is useful for three reasons:
- The try/catch discarded excmds that didn't have a type/documentation,
but being able to autocomplete the name of these functions could still
be useful
- Try/catch are usually expensive
- TypeScript wrongly complained about a missing parenthesis when the
try/catch was there