Skip to content

[trivial] Add example sources to docstrings in cursorEvents.ts - #241250

Merged
Henning Dieterichs (hediet) merged 4 commits into
microsoft:mainfrom
alexander-zw:main
Jul 29, 2026
Merged

Henning Dieterichs (hediet) merged 4 commits into
microsoft:mainfrom
alexander-zw:main

Conversation

@alexander-zw

Copy link
Copy Markdown
Contributor

I know the guidelines say to link a Github issue, but this is such a minor change I think it's not necessary.

Adding these examples will help a lot for devs to use the code more easily, without having to test it to see what is returned.

I didn't definitively say these are the only options to keep the possibility of adding more sources in the future to guard against the docs becoming outdated.

These docstrings will be shown on hover in an IDE and on the docs website, e.g. https://microsoft.github.io/monaco-editor/typedoc/interfaces/editor.ICursorPositionChangedEvent.html#source.

How to test: Hover over the attribute in an IDE like VSCode with the TypeScript extension to see the changes.

@alexander-zw Alexander Wu (alexander-zw) changed the title Add example sources to docstrings in cursorEvents.ts [trivial] Add example sources to docstrings in cursorEvents.ts Feb 19, 2025

@Mannyman77 Mannyman77 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

access denied

Copilot AI review requested due to automatic review settings July 28, 2026 23:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds concrete examples to Monaco Editor cursor event source documentation.

Changes:

  • Documents common 'mouse', 'keyboard', and 'api' source values for position and selection events.
  • Preserves extensibility by presenting them as examples.
Show a summary per file
File Description
src/vs/editor/common/cursorEvents.ts Expands cursor event source JSDoc.

Review details

  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Medium

@hediet
Henning Dieterichs (hediet) merged commit e88a482 into microsoft:main Jul 29, 2026
32 of 54 checks passed
@vs-code-engineering vs-code-engineering Bot added this to the 1.132.0 milestone Jul 29, 2026
@MAP84E3777-06032027LP09-250255

Copy link
Copy Markdown

No tiene que volver 1.0 solo la versión original = V1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants