Skip to content

Commit 0010aef

Browse files
committed
fix: add proper type annotations for automation profile helpers
1 parent d23cd87 commit 0010aef

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/utils/shell.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,31 +169,31 @@ function getLinuxTerminalConfig() {
169169
}
170170

171171
// Automation profile helpers
172-
function getWindowsAutomationProfile() {
172+
function getWindowsAutomationProfile(): WindowsTerminalProfile | null {
173173
try {
174174
const config = vscode.workspace.getConfiguration("terminal.integrated")
175175
const automationProfile = config.get<WindowsTerminalProfile>("automationProfile.windows")
176-
return automationProfile
176+
return automationProfile || null
177177
} catch {
178178
return null
179179
}
180180
}
181181

182-
function getMacAutomationProfile() {
182+
function getMacAutomationProfile(): MacTerminalProfile | null {
183183
try {
184184
const config = vscode.workspace.getConfiguration("terminal.integrated")
185185
const automationProfile = config.get<MacTerminalProfile>("automationProfile.osx")
186-
return automationProfile
186+
return automationProfile || null
187187
} catch {
188188
return null
189189
}
190190
}
191191

192-
function getLinuxAutomationProfile() {
192+
function getLinuxAutomationProfile(): LinuxTerminalProfile | null {
193193
try {
194194
const config = vscode.workspace.getConfiguration("terminal.integrated")
195195
const automationProfile = config.get<LinuxTerminalProfile>("automationProfile.linux")
196-
return automationProfile
196+
return automationProfile || null
197197
} catch {
198198
return null
199199
}

0 commit comments

Comments
 (0)