Commit graph

10 commits

Author SHA1 Message Date
glacambre
9ef99b0ab4
parsers/exmode.ts: replace macro-generated info with ts-generated info
I tested nearly all ex commands and this didn't seem to break anything.
2019-05-31 15:20:46 +02:00
glacambre
03953315a8
compiler: add info about optional/rest arguments 2019-05-31 13:58:27 +02:00
glacambre
923f9caf92
TSLint: enable no-unused-declaration rule
This rule requires adding a new set of rules, tslint-etc.
no-unused-declaration used to be available in tslint:recommended but was
deprecated when --noUnusedVariables was added to typescript. The problem
with using TypeScript's --noUnusedVariables is that it turns unused
declarations into an error and prevents compilation, which isn't fun
when you're just prototyping things.
2019-04-16 08:30:31 +02:00
glacambre
3fe1e5a091
TSLint: re-enable no-empty rule 2019-04-14 10:27:22 +02:00
glacambre
85706a4347
TSLint: re-enable radix rule 2019-04-05 13:16:04 +02:00
glacambre
bcd04a349c
Make compiler tslint/tslint-sonarts ready 2019-03-31 13:30:47 +02:00
glacambre
a808e9e742
Metadata Types: Use a single type instance where it makes sense
One of the possible problems of #1184 (firefox freezing periodically
with Tridactyl enabled) is that Tridactyl uses too much RAM, which could
cause Firefox to attempt to GC it from time to time.
One easy optimisation to try to reduce this problem is to use singletons
for metadata when possible (VoidType, AnyType...).
According to my measurements, this saves the allocation of 933 objects,
which amounted to ~0.03MB. Multiply this by 40 tabs and you get about
1.20MB saved, the space of a whole 1980-era floppy disk.
2018-11-21 06:56:01 +01:00
glacambre
dfbae7ed06
UnionType.ts: Improve error message on failed conversions.
Closes https://github.com/tridactyl/tridactyl/issues/1146.
2018-11-12 19:10:54 +01:00
glacambre
b5da7705e9
Improve generated metadata types for objects
Before this commit, the compiler pass that generated metadata for
settings didn't generate informetion precise enough to be used to
validate settings that existed in objects (e.g. `logging.cmdline`).

This resulted in no typechecking being done for these settings (e.g.
`:set logging.cmdline 1` would not throw any errors). This commit fixes
that.
2018-11-04 17:28:15 +01:00
glacambre
4d0f7c84eb
Make the generated metadata typed
This commit makes the compiler pass use different classes in order to
represent the metadata. This enables adding per-class toString/convert
functions. This enables easy type checking and conversion in the `:set`
excmd.
2018-11-04 17:24:16 +01:00