lib/js: new read and write methods
compiler: js: default values for compound type properties