Skip to content

Support @this tags#24927

Merged
sandersn merged 3 commits into
masterfrom
js/this-tag
Jun 13, 2018
Merged

Support @this tags#24927
sandersn merged 3 commits into
masterfrom
js/this-tag

Conversation

@sandersn
Copy link
Copy Markdown
Member

Currently this is for type checking only -- I haven't added any support in the language service yet, so quickinfo probably doesn't display anything useful.

Fixes #13308

No special support in fourslash yet, so quickinfo probably doesn't work.
@sandersn sandersn requested review from a user and mhegazy June 13, 2018 16:14
@sandersn
Copy link
Copy Markdown
Member Author

  1. CI is failing because of public API baselines that I have now updated.
  2. After some discussion with @mhegazy we decided to support the brace-free specification of types, to align with usejsdoc.org, even though this makes comments ambiguous in the Typescript scenario, where the type is not normally specified:
/** @this A - the type is 'A', the comment starts with '-' */
function f(this: number) {
}

However, @param already works for this scenario, so we expect @this to be used almost exclusively in Javascript.

@sandersn sandersn merged commit 2a8c4d1 into master Jun 13, 2018
@sandersn sandersn deleted the js/this-tag branch June 13, 2018 17:11
@ghost ghost mentioned this pull request Jun 14, 2018
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants