setting type from js file