Typescript Object Property Type Function Javascript Mdn