JS: gather object literal properties in declarations.