fixed issues with Typescript typings definition -> Issue #2