Skip to content

Commit ea77328

Browse files
committed
fix doc lint & lock
1 parent 7bb6ff8 commit ea77328

22 files changed

+3905
-3910
lines changed

packages/@ember/debug/ember-inspector-support/adapters/basic.ts

+1-9
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { onReady } from '../utils/on-ready';
66
export default class BasicAdapter extends BaseObject {
77
private _messageCallbacks: any[] = [];
88
private __environment = '';
9-
interval: number | undefined;
9+
declare interval: number | undefined;
1010
init() {
1111
Promise.resolve(this.connect()).then(() => {
1212
this.onConnectionReady();
@@ -18,9 +18,6 @@ export default class BasicAdapter extends BaseObject {
1818
/**
1919
* Uses the current build's config module to determine
2020
* the environment.
21-
*
22-
* @property environment
23-
* @type {String}
2421
*/
2522
get environment() {
2623
if (!this.__environment) {
@@ -40,7 +37,6 @@ export default class BasicAdapter extends BaseObject {
4037
/**
4138
* A wrapper for `console.warn`.
4239
*
43-
* @method warn
4440
*/
4541
warn(...args: any[]) {
4642
return console.warn(...args);
@@ -91,8 +87,6 @@ export default class BasicAdapter extends BaseObject {
9187
* The idea is to control errors triggered by the inspector
9288
* and make sure that users don't get mislead by inspector-caused
9389
* bugs.
94-
*
95-
* @method handleError
9690
* @param {Error} error
9791
*/
9892
handleError(error: any) {
@@ -115,8 +109,6 @@ export default class BasicAdapter extends BaseObject {
115109
116110
A promise that resolves when the connection
117111
with the inspector is set up and ready.
118-
119-
@return {Promise}
120112
*/
121113
connect() {
122114
return new Promise((resolve, reject) => {

packages/@ember/debug/ember-inspector-support/adapters/web-extension.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import BasicAdapter from './basic';
22
import { run } from '@ember/runloop';
33

44
export default class WebExtension extends BasicAdapter {
5-
declare private _channel: MessageChannel;
6-
declare private _chromePort: MessagePort;
5+
private declare _channel: MessageChannel;
6+
private declare _chromePort: MessagePort;
77
init() {
88
this._channel = new MessageChannel();
99
this._chromePort = this._channel?.port1;

packages/@ember/debug/ember-inspector-support/deprecation-debug.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import type SourceMapSupport from '@ember/debug/ember-inspector-support/libs/sou
88

99
export default class DeprecationDebug extends DebugPort {
1010
declare options: any;
11-
declare private _warned: boolean;
11+
private declare _warned: boolean;
1212
declare debounce: any;
13-
declare private _watching: any;
13+
private declare _watching: any;
1414
declare deprecationsToSend: {
1515
stackStr: string;
1616
message: string;
@@ -19,10 +19,10 @@ export default class DeprecationDebug extends DebugPort {
1919
id: string;
2020
sources: any[];
2121
}[];
22-
declare private sourceMap: SourceMapSupport;
22+
private declare sourceMap: SourceMapSupport;
2323
declare groupedDeprecations: any;
2424
declare deprecations: any;
25-
declare private __emberCliConfig: any;
25+
private declare __emberCliConfig: any;
2626
static {
2727
this.prototype.portNamespace = 'deprecation';
2828
this.prototype.sourceMap = new SourceMap();

packages/@ember/debug/ember-inspector-support/general-debug.ts

-10
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,6 @@ export default class GeneralDebug extends DebugPort {
5555
* Contains ember-cli configuration info.
5656
*
5757
* Info used to determine the file paths of an ember-cli app.
58-
*
59-
* @return {Object}
60-
* {String} environment ex: 'development'
61-
* {String} modulePrefix ex: 'my-app'
62-
* {String} podModulePrefix ex: 'my-app/pods'
63-
* {Boolean} usePodsByDefault
6458
*/
6559
emberCliConfig = this.getAppConfig();
6660

@@ -130,10 +124,6 @@ export default class GeneralDebug extends DebugPort {
130124

131125
/**
132126
* Finds a meta tag by searching through a certain meta attribute.
133-
*
134-
* @param {String} attribute
135-
* @param {RegExp} regExp
136-
* @return {Element}
137127
*/
138128
function findMetaTag(attribute: string, regExp = /.*/) {
139129
let metas = document.querySelectorAll(`meta[${attribute}]`);

packages/@ember/debug/ember-inspector-support/index.ts

-16
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@ function loadEmberDebug(
170170
/**
171171
* Get all the Ember.Application instances from Ember.Namespace.NAMESPACES
172172
* and add our own applicationId and applicationName to them
173-
* @return {*}
174173
*/
175174
function getApplications() {
176175
let namespaces = A(Namespace.NAMESPACES);
@@ -250,10 +249,6 @@ function loadEmberDebug(
250249
/**
251250
* Checks if a version is between two different versions.
252251
* version should be >= left side, < right side
253-
*
254-
* @param {String} version1
255-
* @param {String} version2
256-
* @return {Boolean}
257252
*/
258253
function versionTest(version: string, between: [string, string]) {
259254
let fromVersion = between[0];
@@ -272,10 +267,6 @@ function loadEmberDebug(
272267
* `-1` if version1 < version
273268
* 0 if version1 == version2
274269
* 1 if version1 > version2
275-
*
276-
* @param {String} version1
277-
* @param {String} version2
278-
* @return {Boolean} result of the comparison
279270
*/
280271
function compareVersion(version1: string, version2: string) {
281272
let compared, i;
@@ -292,19 +283,12 @@ function loadEmberDebug(
292283

293284
/**
294285
* Remove -alpha, -beta, etc from versions
295-
*
296-
* @param {String} version
297-
* @return {String} The cleaned up version
298286
*/
299287
function cleanupVersion(version: string) {
300288
return version.replace(/-.*/g, '');
301289
}
302290

303291
/**
304-
* @method compare
305-
* @param {Number} val
306-
* @param {Number} number
307-
* @return {Number}
308292
* 0: same
309293
* -1: <
310294
* 1: >

packages/@ember/debug/ember-inspector-support/libs/promise-assembler.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ export type PromiseChainedEvent = {
2222
class PromiseAssembler extends Evented.extend(BaseObject) {
2323
// RSVP lib to debug
2424
isStarted = false;
25-
RSVP: any;
26-
all!: any[];
27-
promiseIndex!: Record<string, number>;
25+
declare RSVP: any;
26+
declare all: any[];
27+
declare promiseIndex: Record<string, number>;
2828
promiseChained: ((e: any) => void) | null = null;
2929
promiseRejected: ((e: any) => void) | null = null;
3030
promiseFulfilled: ((e: any) => void) | null = null;

packages/@ember/debug/ember-inspector-support/libs/render-tree.ts

+13-25
Original file line numberDiff line numberDiff line change
@@ -130,23 +130,22 @@ class InElementSupportProvider {
130130
}
131131

132132
export default class RenderTree {
133-
tree!: CapturedRenderNode[];
134-
owner: any;
135-
retainObject: any;
136-
releaseObject: any;
137-
inspectNode: (node: Node) => void;
138-
renderNodeIdPrefix: string;
139-
nodes!: Record<string, CapturedRenderNode>;
140-
serialized!: Record<string, any>;
141-
ranges!: Record<string, Range | null | undefined>;
142-
parentNodes: any;
143-
previouslyRetainedObjects: any;
144-
retainedObjects: any;
145-
inElementSupport: InElementSupportProvider | undefined;
133+
declare tree: CapturedRenderNode[];
134+
declare owner: any;
135+
declare retainObject: any;
136+
declare releaseObject: any;
137+
declare inspectNode: (node: Node) => void;
138+
declare renderNodeIdPrefix: string;
139+
declare nodes: Record<string, CapturedRenderNode>;
140+
declare serialized: Record<string, any>;
141+
declare ranges: Record<string, Range | null | undefined>;
142+
declare parentNodes: any;
143+
declare previouslyRetainedObjects: any;
144+
declare retainedObjects: any;
145+
declare inElementSupport: InElementSupportProvider | undefined;
146146
/**
147147
* Sets up the initial options.
148148
*
149-
* @method constructor
150149
* @param {Object} options
151150
* - {owner} owner The Ember app's owner.
152151
* - {Function} retainObject Called to retain an object for future inspection.
@@ -201,9 +200,6 @@ export default class RenderTree {
201200
* bounds: Option<'single' | 'range'>;
202201
* children: SerializedRenderNode[];
203202
* }
204-
*
205-
* @method build
206-
* @return {Array<SerializedRenderNode>} The render nodes tree.
207203
*/
208204
build() {
209205
this._reset();
@@ -218,9 +214,6 @@ export default class RenderTree {
218214

219215
/**
220216
* Find a render node by id.
221-
*
222-
* @param {string} id A render node id.
223-
* @return {Option<SerializedRenderNode>} A render node with the given id, if any.
224217
*/
225218
find(id: string): CapturedRenderNode | null {
226219
let node = this.nodes[id];
@@ -235,7 +228,6 @@ export default class RenderTree {
235228
/**
236229
* Find the deepest enclosing render node for a given DOM node.
237230
*
238-
* @method findNearest
239231
* @param {Node} node A DOM node.
240232
* @param {string} hint The id of the last-matched render node (see comment below).
241233
* @return {Option<SerializedRenderNode>} The deepest enclosing render node, if any.
@@ -280,7 +272,6 @@ export default class RenderTree {
280272
/**
281273
* Get the bounding rect for a given render node id.
282274
*
283-
* @method getBoundingClientRect
284275
* @param {*} id A render node id.
285276
* @return {Option<DOMRect>} The bounding rect, if the render node is found and has valid `bounds`.
286277
*/
@@ -315,7 +306,6 @@ export default class RenderTree {
315306
/**
316307
* Get the DOM range for a give render node id.
317308
*
318-
* @method getRange
319309
* @param {string} id A render node id.
320310
* @return {Option<Range>} The DOM range, if the render node is found and has valid `bounds`.
321311
*/
@@ -343,7 +333,6 @@ export default class RenderTree {
343333
/**
344334
* Scroll the given render node id into view (if the render node is found and has valid `bounds`).
345335
*
346-
* @method scrollIntoView
347336
* @param {string} id A render node id.
348337
*/
349338
scrollIntoView(id: string) {
@@ -368,7 +357,6 @@ export default class RenderTree {
368357
* Inspect the bounds for the given render node id in the "Elements" panel (if the render node
369358
* is found and has valid `bounds`).
370359
*
371-
* @method inspectElement
372360
* @param {string} id A render node id.
373361
*/
374362
inspectElement(id: string) {

packages/@ember/debug/ember-inspector-support/libs/source-map.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { SourceMapConsumer } from 'source-map-js';
33
const notFoundError = new Error('Source map url not found');
44

55
export default class SourceMapSupport extends BaseObject {
6-
private _lastPromise!: Promise<any>;
6+
private declare _lastPromise: Promise<any>;
77
init() {
88
super.init();
99
this._lastPromise = Promise.resolve(undefined);
@@ -12,9 +12,6 @@ export default class SourceMapSupport extends BaseObject {
1212
/**
1313
* Returns a promise that resolves to an array
1414
* of mapped sourcew.
15-
*
16-
* @param {String} stack The stack trace
17-
* @return {RSVP.Promise}
1815
*/
1916
map(stack: string): Promise<any> {
2017
let parsed = fromStackProperty(stack);

packages/@ember/debug/ember-inspector-support/libs/view-inspection.ts

+17-17
Original file line numberDiff line numberDiff line change
@@ -229,23 +229,23 @@ function makeStylesheet(id: string) {
229229
}
230230

231231
export default class ViewInspection {
232-
renderTree: RenderTree;
233-
objectInspector: ObjectInspector;
234-
private didShow: (id: string, pin: boolean) => void;
235-
private didHide: (id: string, pinned: boolean) => void;
236-
private didStartInspecting: () => void;
237-
private didStopInspecting: () => void;
238-
private id: string;
239-
private currentId: string | null;
240-
private lastMatchId: string | null;
241-
private isInspecting: boolean;
242-
private lastTarget: EventTarget | null;
243-
private isShowing: boolean;
244-
private isPinned: boolean;
245-
246-
private highlight!: HTMLElement;
247-
private tooltip!: HTMLElement;
248-
private stylesheet!: HTMLElement;
232+
declare renderTree: RenderTree;
233+
declare objectInspector: ObjectInspector;
234+
private declare didShow: (id: string, pin: boolean) => void;
235+
private declare didHide: (id: string, pinned: boolean) => void;
236+
private declare didStartInspecting: () => void;
237+
private declare didStopInspecting: () => void;
238+
private declare id: string;
239+
private declare currentId: string | null;
240+
private declare lastMatchId: string | null;
241+
private declare isInspecting: boolean;
242+
private declare lastTarget: EventTarget | null;
243+
private declare isShowing: boolean;
244+
private declare isPinned: boolean;
245+
246+
private declare highlight: HTMLElement;
247+
private declare tooltip: HTMLElement;
248+
private declare stylesheet: HTMLElement;
249249
constructor({
250250
renderTree,
251251
objectInspector,

packages/@ember/debug/ember-inspector-support/main.ts

-3
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ class EmberDebug extends BaseObject {
4343
/**
4444
* We use the application's id instead of the owner's id so that we use the same inspector
4545
* instance for the same application even if it was reset (owner changes on reset).
46-
*
47-
* @property applicationId
48-
* @type {String}
4946
*/
5047
get applicationId() {
5148
if (!this.isTesting) {

packages/@ember/debug/ember-inspector-support/models/profile-manager.ts

+8-10
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,14 @@ type Highlight = {
8585
*/
8686
export default class ProfileManager {
8787
profiles: ProfileNode[] = [];
88-
current: ProfileNode | undefined;
89-
queue: Info[];
90-
highlights: Highlight[];
91-
currentSet: ProfileNode[];
92-
private _profilesAddedCallbacks: { context: any; callback: Function }[];
93-
shouldHighlightRender: boolean;
94-
isHighlightEnabled: boolean;
95-
stylesheet: HTMLStyleElement;
88+
declare current: ProfileNode | undefined;
89+
declare queue: Info[];
90+
declare highlights: Highlight[];
91+
declare currentSet: ProfileNode[];
92+
private declare _profilesAddedCallbacks: { context: any; callback: Function }[];
93+
declare shouldHighlightRender: boolean;
94+
declare isHighlightEnabled: boolean;
95+
declare stylesheet: HTMLStyleElement;
9696
constructor() {
9797
this.currentSet = [];
9898
this._profilesAddedCallbacks = [];
@@ -150,8 +150,6 @@ export default class ProfileManager {
150150

151151
/**
152152
* Push a new profile into the queue
153-
* @param info
154-
* @return {number}
155153
*/
156154
addToQueue(info: Info) {
157155
const index = this.queue.push(info);

packages/@ember/debug/ember-inspector-support/models/profile-node.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ export type Payload = {
1818

1919
class ProfileNode {
2020
isHighlightEnabled = true;
21-
time!: number;
22-
start: number;
23-
timestamp: any;
24-
viewGuid: string | undefined;
25-
name: string;
26-
parent: ProfileNode | undefined;
27-
children: ProfileNode[];
28-
duration: number | undefined;
21+
declare time: number;
22+
declare start: number;
23+
declare timestamp: any;
24+
declare viewGuid: string | undefined;
25+
declare name: string;
26+
declare parent: ProfileNode | undefined;
27+
declare children: ProfileNode[];
28+
declare duration: number | undefined;
2929
constructor(start: number, payload: Payload, parent?: ProfileNode, now?: number) {
3030
let name;
3131
this.start = start;

0 commit comments

Comments
 (0)