js: first pass at native type support