You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ts] Property 'getErrorAsString' does not exist on type 'typeof global'.
A second - possibly related issue - is that the declaration of clazz1bGlobalVar: clazz1b in ./types/node-global.d.ts is infered to (property) NodeJS.Global.clazz1bGlobalVar: any
A third - possibly related issue - is that if you alter the declaration of clazz1bGlobalVar: clazz1b in ./types/node-global.d.ts to clazz1bGlobalVar: number, it is infered correctly in this file as (property) NodeJS.Global.clazz1bGlobalVar: number. But in e.g. index.js, you can assign just a value of any type to that, e.g. global.clazz1bGlobalVar= "clazz1bInstance". And on hover (property) global.clazz1bGlobalVar: string is shown.
Activity
DanielRosenwasser commentedon Sep 12, 2018
Right now you'll need to augment the type of the global object in Node, though I suspect this is a relatively common thing.
joma74 commentedon Sep 13, 2018
This should already be addressed by
types/node-global.d.tsin the playground link. If not, sorry, i could not follow your advice.brendankenny commentedon Sep 18, 2018
I believe this was fixed by #26918 (like #27099 was) and should be good to go with
typescript@nextjoma74 commentedon Sep 19, 2018
Brendan Kenny (@brendankenny) Thanks for the heads-up!
Confirm that this is fixed in 3.1.0-dev.20180919