shareable-twoslash-comments 0.0.6 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  ## Shareable Twoslash Comments
2
2
 
3
- A TypeScript Playground plugin that embeds twoslash (// ^?) type hints as literal comments in your code, making them easy to copy and share.
3
+ A TypeScript Playground plugin that injects twoslash (// ^?) type hints as literal comments in your code, making them easy to copy and share.
4
4
 
5
- https://github.com/user-attachments/assets/2224eec7-3011-4a08-b157-9eb6da700675
5
+ https://github.com/user-attachments/assets/78243c42-a868-4ece-9815-e869a20e30b6
6
6
 
7
7
  ## Running this plugin
8
8
 
package/dist/index.js CHANGED
@@ -96,7 +96,7 @@ define(function () { 'use strict';
96
96
  case 4:
97
97
  quickInfo = _d.sent();
98
98
  quickInfoString = (_c = (_b = quickInfo === null || quickInfo === void 0 ? void 0 : quickInfo.displayParts) === null || _b === void 0 ? void 0 : _b.map(function (d) { return d.text; }).join("")) !== null && _c !== void 0 ? _c : "";
99
- quickInfoComment = "".concat(match[0], " ").concat(multilineEnabled
99
+ quickInfoComment = "".concat(match[0]).concat(quickInfoString.length > 0 ? " " : "").concat(multilineEnabled
100
100
  ? quickInfoString.replace(/\r?\n/g, model.getEOL() + commentPrefix)
101
101
  : truncate(quickInfoString.replace(/\r?\n\s*/g, " "), truncationDisabled ? Number.POSITIVE_INFINITY : 100));
102
102
  prevQuickInfoComment = getPreviousQuickInfoComment({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shareable-twoslash-comments",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "main": "dist/index.js",
5
5
  "description": "A TypeScript Playground plugin that embeds twoslash (// ^?) type hints as literal comments in your code, making them easy to copy and share.",
6
6
  "license": "MIT",