elastic / apm-agent-rum-js

https://www.elastic.co/guide/en/apm/agent/rum-js/current/index.html
MIT License
279 stars 135 forks source link

Missing `block` method in type declaration #1358

Open ldgrp opened 1 year ago

ldgrp commented 1 year ago

The API reference documents the existence of transaction.block https://www.elastic.co/guide/en/apm/agent/rum-js/current/transaction-api.html#transaction-block

It appears to be a public method of Transaction here https://github.com/elastic/apm-agent-rum-js/blob/bf7690e69130978c9782a1adc51647f5c77f781a/packages/rum-core/src/performance-monitoring/transaction.js#L157

But is not included in the type declaration https://github.com/elastic/apm-agent-rum-js/blob/bf7690e69130978c9782a1adc51647f5c77f781a/packages/rum/src/index.d.ts#L30-L53

ldgrp commented 1 year ago

I think this might be related https://github.com/elastic/apm-agent-rum-js/issues/1267

devcorpio commented 1 year ago

Hi @ldgrp,

Thanks for pointing it out, much appreciated

For the time being, if the missing type declaration is causing you any issues you could apply the workaround described here

Cheers, Alberto