Skip to content

Commit

Permalink
Fix a few typos
Browse files Browse the repository at this point in the history
  • Loading branch information
planger committed May 16, 2024
1 parent e44ca7f commit b5109dd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@
"type": "number",
"default": 500,
"minimum": 500,
"markdownDescription": "Controls the delay in milliseconds after which a Memory Inspector is refrehsed automatically. Only applies when `#memory-inspector.periodicRefresh#` is enabled."
"markdownDescription": "Controls the delay in milliseconds after which a Memory Inspector is refreshed automatically. Only applies when `#memory-inspector.periodicRefresh#` is enabled."
},
"memory-inspector.groupings.bytesPerMAU": {
"type": "number",
Expand Down
4 changes: 2 additions & 2 deletions src/plugin/memory-webview-main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ export class MemoryWebview implements vscode.CustomReadonlyEditorProvider {
const sessionId = session?.id;
return {
sessionId,
canRead: !!this.sessionTracker.hasDebugCapabilitiy(session, 'supportsReadMemoryRequest'),
canWrite: !!this.sessionTracker.hasDebugCapabilitiy(session, 'supportsWriteMemoryRequest'),
canRead: !!this.sessionTracker.hasDebugCapability(session, 'supportsReadMemoryRequest'),
canWrite: !!this.sessionTracker.hasDebugCapability(session, 'supportsWriteMemoryRequest'),
stopped: this.sessionTracker.isStopped(session)
};
}
Expand Down
8 changes: 4 additions & 4 deletions src/plugin/session-tracker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,23 +158,23 @@ export class SessionTracker implements vscode.DebugAdapterTrackerFactory {
return !!session && !!this.sessionInfo(session).stopped;
}

hasDebugCapabilitiy(session = this.activeSession, capability: DebugCapability): boolean {
hasDebugCapability(session = this.activeSession, capability: DebugCapability): boolean {
return !!session && !!this.sessionInfo(session).debugCapabilities?.[capability];
}

assertDebugCapability(session = this.assertActiveSession(), capability: DebugCapability, action: string = 'execute action'): vscode.DebugSession {
if (!this.hasDebugCapabilitiy(session, capability)) {
if (!this.hasDebugCapability(session, capability)) {
throw new Error(`Cannot ${action}. Session does not have capability '${capability}'.`);
}
return session;
}

hasClientCapabilitiy(session: vscode.DebugSession | undefined, capability: ClientCapability): boolean {
hasClientCapability(session: vscode.DebugSession | undefined, capability: ClientCapability): boolean {
return !!session && !!this.sessionInfo(session).clientCapabilities?.[capability];
}

assertClientCapability(session = this.assertActiveSession(), capability: ClientCapability, action: string = 'execute action'): vscode.DebugSession {
if (!this.hasClientCapabilitiy(session, capability)) {
if (!this.hasClientCapability(session, capability)) {
throw new Error(`Cannot ${action}. Client does not have capability '${capability}'.`);
}
return session;
Expand Down

0 comments on commit b5109dd

Please sign in to comment.