# JSDoc / Type annotations for global context from custom node

**URL:** https://discourse.nodered.org/t/jsdoc-type-annotations-for-global-context-from-custom-node/79137
**Category:** Developing Nodes
**Created:** [12 June 2023 07:33 UTC](https://discourse.nodered.org/t/jsdoc-type-annotations-for-global-context-from-custom-node/79137 "2023-06-12T07:33:05Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![CSL](https://avatars.discourse-cdn.com/v4/letter/c/aeb1de/32.png) [@CSL](https://discourse.nodered.org/u/CSL)
#### Post date: [12 June 2023 07:33 UTC](https://discourse.nodered.org/t/jsdoc-type-annotations-for-global-context-from-custom-node/79137/1 "2023-06-12T07:33:05Z")

</div>

Hi,

I'm trying to have code completion for an object i registered in the global context using a custom node.

I am fine with either JSDoc typedefs or using Typescript, I just want some sort of code completion there.

I tried using the hints from

- [Code completion and error flagging on a global variable](https://discourse.nodered.org/t/code-completion-and-error-flagging-on-a-global-variable/69260)
- [Function Node Code Completion for Module (Monaco Editor) - #9 by harmonic7](https://discourse.nodered.org/t/function-node-code-completion-for-module-monaco-editor/49779/9)
- [Monaco Editor "System-wide" code-completition - #4 by Steve-Mcl](https://discourse.nodered.org/t/monaco-editor-system-wide-code-completition/48868/4)

but i could not figure it out. Can anyone help me how to make this work? Maybe the discussions above are outdated already?

Thanks a lot

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [11 August 2023 07:33 UTC](https://discourse.nodered.org/t/jsdoc-type-annotations-for-global-context-from-custom-node/79137/2 "2023-08-11T07:33:14Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
