I don't actually know what this JS is for, but should it really have two entries called `"type"`?