Vanilla JS deftype