Applicationinsights-js: Update DefinitelyTyped typings (on every release?)

Created on 17 Jul 2017  路  3Comments  路  Source: microsoft/ApplicationInsights-JS

It looks like the typings at DefinitelyTyped are out of date again? for example, most (all?) of the trackX methods take properties, measurements as optional args, but DefinitelyTyped doesn't have that for trackDependency or trackTrace. the RemoteDependencyData type there doesn't show measurements as a field either, so you can't work around it by making the data object yourself and doing track(data)

Strangely, it looks like measurements doesn't exist here on trackTrace and Trace types? not sure why that is, the underlying data schema has it in analytics but there's no way to get data there? and in this case, DefinitelyTyped shows measurements as a field on the MessageData object?

bug

Most helpful comment

Perhaps including types with the package like we do for node.js (rather than using DefinitelyTyped) would be a reliable way to keep this in sync. (See https://github.com/Microsoft/ApplicationInsights-node.js/pull/240)

All 3 comments

Perhaps including types with the package like we do for node.js (rather than using DefinitelyTyped) would be a reliable way to keep this in sync. (See https://github.com/Microsoft/ApplicationInsights-node.js/pull/240)

Could this be looking into please? We are developing an angular application using typescript and not having the correct types is very frustrating.

Thanks.

V2 of the SDK has typings built in, if you instrument using npm.
https://www.npmjs.com/package/@microsoft/applicationinsights-web#getting-started

Reopen if this doesn't solve your problem.

Was this page helpful?
0 / 5 - 0 ratings