createDecorationsCollection return interface IEditorDecorationsCollection. You call this method only one time and then work with returned object. https://microsoft.github.io/monaco-editor/typedoc/interfaces/editor.IEditorDecorationsCollection.html