build types.json
load types from json, compatible with browserify