Skip to content
This repository has been archived by the owner on Nov 5, 2021. It is now read-only.

Adopt "deprecated" API #67

Merged
merged 5 commits into from
Sep 8, 2020
Merged

Conversation

spahnke
Copy link
Contributor

@spahnke spahnke commented Sep 7, 2020

Adopts tags to mark elements as deprecated in diagnostics and suggestion items so that they can be rendered with a strikethrough syle.

Editor and suggestion item:
image

I also added tags (e.g. @param, @deprecated) to the documentation of suggestion items. This helps to discover alternatives to deprecated items if they are documented appropriately:
image

Finally I aligned the representation of tags in suggestion documentation and hover information (this existed before and I replaced it with the new logic). Let me know if this is OK. I tried to adopt the representation of VS Code as far as @param tags are concerned, where the parameter name is represented as code and the actual documentation text is appended with a separation character:
image

Example code:

class Test {
	/**
	 * asdf
	 * @param {number} a testing `code`
	 * @param {number} b testing more `code`
	 * @deprecated use `bar` instead
	 */
	foo(a, b) { }

	bar(a, b) { }
}

new Test().foo(1, 2);

/** @deprecated use that other function instead */
function test() { }

test()

@alexdima
Copy link
Member

alexdima commented Sep 8, 2020

This is great, thank you!

@alexdima alexdima added this to the August 2020 milestone Sep 8, 2020
@alexdima alexdima merged commit 926a105 into microsoft:master Sep 8, 2020
@spahnke spahnke deleted the deprecated-api branch September 9, 2020 06:49
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