Skip to content

Commit 79131bb

Browse files
devvaannshabose
authored andcommitted
fix: js files to make it docusaurus compatible
1 parent bf2d1fa commit 79131bb

File tree

8 files changed

+30
-34
lines changed

8 files changed

+30
-34
lines changed

src/features/QuickViewManager.js

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -262,19 +262,17 @@ define(function (require, exports, module) {
262262
* 3. If non-null, but visible==false, we're waiting for HOVER_DELAY, which
263263
* is tracked by hoverTimer. The state changes to visible==true as soon as
264264
* there is a provider. If the mouse moves before then, timer is restarted.
265-
*
266-
* @type {{
267-
* visible: boolean,
268-
* editor: !Editor,
269-
* hoverTimer: number, - setTimeout() token
270-
* start: !{line, ch}, - start of matched text range
271-
* end: !{line, ch}, - end of matched text range
272-
* content: !string, - HTML content to display in popover
273-
* xpos: number, - x of center of popover
274-
* ytop: number, - y of top of matched text (when popover placed above text, normally)
275-
* ybot: number, - y of bottom of matched text (when popover moved below text, avoiding window top)
276-
* marker: ?CodeMirror.TextMarker - only set once visible==true
277-
* }}
265+
* @typedef {Object} PopoverState
266+
* @property {boolean} visible - Whether the popover is visible.
267+
* @property {!Editor} editor - The editor instance associated with the popover.
268+
* @property {number} hoverTimer - The token returned by setTimeout().
269+
* @property {!{line: number, ch: number}} start - Start of the matched text range.
270+
* @property {!{line: number, ch: number}} end - End of the matched text range.
271+
* @property {!string} content - HTML content to display in the popover.
272+
* @property {number} xpos - X-coordinate of the center of the popover.
273+
* @property {number} ytop - Y-coordinate of the top of the matched text when popover is above the text.
274+
* @property {number} ybot - Y-coordinate of the bottom of the matched text when popover is below the text.
275+
* @property {?CodeMirror.TextMarker} marker - The text marker; only set once `visible` is `true`.
278276
* @private
279277
*/
280278
let popoverState = null;
@@ -413,7 +411,7 @@ define(function (require, exports, module) {
413411
* Returns a popover array with the list of popovers to be rendered after filtering from providers.
414412
* @param results
415413
* @param providerInfos
416-
* @return {*[]}
414+
* @return []
417415
* @private
418416
*/
419417
function _getPopover(results, providerInfos) {

src/features/SelectionViewManager.js

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -218,17 +218,15 @@ define(function (require, exports, module) {
218218
* 3. If non-null, but visible==false, we're waiting for HOVER_DELAY, which
219219
* is tracked by hoverTimer. The state changes to visible==true as soon as
220220
* there is a provider. If the mouse moves before then, timer is restarted.
221-
*
222-
* @type {{
223-
* visible: boolean,
224-
* editor: !Editor,
225-
* start: !{line, ch}, - start of matched text range
226-
* end: !{line, ch}, - end of matched text range
227-
* content: !string, - HTML content to display in popover
228-
* xpos: number, - x of center of popover
229-
* ytop: number, - y of top of matched text (when popover placed above text, normally)
230-
* ybot: number, - y of bottom of matched text (when popover moved below text, avoiding window top)
231-
* }}
221+
* @typedef {Object} PopoverState
222+
* @property {boolean} visible - Whether the popover is visible.
223+
* @property {!Editor} editor - The editor instance associated with the popover.
224+
* @property {!{line: number, ch: number}} start - Start of the matched text range.
225+
* @property {!{line: number, ch: number}} end - End of the matched text range.
226+
* @property {!string} content - HTML content to display in the popover.
227+
* @property {number} xpos - X-coordinate of the center of the popover.
228+
* @property {number} ytop - Y-coordinate of the top of the matched text when the popover is placed above the text.
229+
* @property {number} ybot - Y-coordinate of the bottom of the matched text when the popover is moved below the text.
232230
* @private
233231
*/
234232
let popoverState = null;

src/utils/EventManager.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,12 @@ define(function (require, exports, module) {
144144
* // and not available for use in extensions.
145145
* window.Phoenix.TRUSTED_ORIGINS ["http://mydomain.com"] = true;
146146
* EventManager.registerEventHandler("`extensionName`-iframeMessageHandler", exports);
147-
* exports.on("iframeHelloEvent", function(_ev, event){
147+
* exports.on("iframeHelloEvent", function(_ev, event)\{
148148
* console.log(event.data.message);
149149
* });
150150
*
151151
* // Now from your iframe, send a message to the above event handler using:
152-
* window.parent.postMessage({
152+
* window.parent.postMessage(\{
153153
* handlerName: "`extensionName`-iframeMessageHandler",
154154
* eventName: "iframeHelloEvent",
155155
* message: "hello world"

src/utils/ExtensionInterface.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
* let angularCli;
5050
* ExtensionInterface.waitAndGetExtensionInterface("angularCli").then(interfaceObj=> angularCli = interfaceObj);
5151
* ...
52-
* if(angularCli){ // check if angular cli is avilable
52+
* if(angularCli)\{ // check if angular cli is avilable
5353
* angularCli.callSomeFunction();
5454
* }
5555
* ...
@@ -108,7 +108,7 @@ define(function (require, exports, module) {
108108
* let angularCli;
109109
* ExtensionInterface.waitAndGetExtensionInterface("angularCli").then(interfaceObj=> angularCli = interfaceObj);
110110
* ...
111-
* if(angularCli){ // check if angular cli is avilable
111+
* if(angularCli)\{ // check if angular cli is avilable
112112
* angularCli.callSomeFunction();
113113
* }
114114
* ...

src/utils/FeatureGate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ define(function (require, exports, module) {
8989

9090
/**
9191
* Returns an array of all named registered feature gates.
92-
* @return {[String]} list of registered features
92+
* @return [] list of registered features
9393
* @type {function}
9494
*/
9595
function getAllRegisteredFeatures() {

src/utils/StringUtils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ define(function (require, exports, module) {
4444
* Example: var formatted = StringUtils.format("Hello {0}", "World");
4545
*
4646
* @param {string} str The base string
47-
* @param {...} Arguments to be substituted into the string
47+
* @param {rest} Arguments to be substituted into the string
4848
*
4949
* @return {string} Formatted string
5050
*/

src/widgets/NotificationUI.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ define(function (require, exports, module) {
180180
* // note that you can even provide an HTML Element node with
181181
* // custom event handlers directly here instead of HTML text.
182182
* let notification1 = NotificationUI.createFromTemplate(
183-
* "<div>Click me to locate the file in file tree</div>", "showInfileTree",{
183+
* "<div>Click me to locate the file in file tree</div>", "showInfileTree",\{
184184
* allowedPlacements: ['top', 'bottom'],
185185
* dismissOnClick: false,
186186
* autoCloseTimeS: 300 // auto close the popup after 5 minutes
@@ -307,7 +307,7 @@ define(function (require, exports, module) {
307307
* // note that you can even provide an HTML Element node with
308308
* // custom event handlers directly here instead of HTML text.
309309
* let notification1 = NotificationUI.createToastFromTemplate( "Title here",
310-
* "<div>Click me to locate the file in file tree</div>", {
310+
* "<div>Click me to locate the file in file tree</div>", \{
311311
* dismissOnClick: false,
312312
* autoCloseTimeS: 300 // auto close the popup after 5 minutes
313313
* });

src/worker/IndexingWorker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ define(function (require, exports, module) {
9696
* To Execute a named function `extensionName.sayHello` in the worker from phoenix
9797
* // in my_worker.js. It is a good practice to prefix your `[extensionName]`
9898
* // to exec handler to prevent name collisions with other extensions.
99-
* WorkerComm.setExecHandler("extensionName.sayHello", (arg)=>{
99+
* WorkerComm.setExecHandler("extensionName.sayHello", (arg)=>\{
100100
* console.log("hello from worker ", arg); // prints "hello from worker phoenix"
101101
* return "Hello Phoenix";
102102
* });

0 commit comments

Comments
 (0)