Skip to content

Commit 4213222

Browse files
Copilotnturinski
andauthored
Add JSDoc documentation for IStartFuncProcessResult stream property (#4885)
* Initial plan * Add JSDoc documentation for IStartFuncProcessResult interface Co-authored-by: nturinski <5290572+nturinski@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: nturinski <5290572+nturinski@users.noreply.github.com>
1 parent 8ac0664 commit 4213222

File tree

2 files changed

+32
-28
lines changed

2 files changed

+32
-28
lines changed

package-lock.json

Lines changed: 2 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/commands/pickFuncProcess.ts

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,40 @@ import { getWorkspaceSetting } from '../vsCodeConfig/settings';
2121
const funcTaskReadyEmitter = new vscode.EventEmitter<vscode.WorkspaceFolder>();
2222
export const onDotnetFuncTaskReady = funcTaskReadyEmitter.event;
2323

24+
/**
25+
* Result returned from starting a function host process via the API.
26+
*/
27+
export interface IStartFuncProcessResult {
28+
/**
29+
* The process ID of the started function host.
30+
*/
31+
processId: string;
32+
/**
33+
* Whether the function host was successfully started.
34+
*/
35+
success: boolean;
36+
/**
37+
* Error message if the function host failed to start.
38+
*/
39+
error: string;
40+
/**
41+
* An async iterable stream of terminal output from the function host task.
42+
* This stream provides real-time access to the output of the `func host start` command,
43+
* allowing consumers to monitor host status, capture logs, and detect errors.
44+
*
45+
* The stream will be undefined if the host failed to start or if output streaming is not available.
46+
* Consumers should iterate over the stream asynchronously to read output lines as they are produced.
47+
* The stream remains active for the lifetime of the function host process.
48+
*/
49+
stream: AsyncIterable<string> | undefined;
50+
}
51+
2452
export async function startFuncProcessFromApi(
2553
buildPath: string,
2654
args: string[],
2755
env: { [key: string]: string }
28-
): Promise<{ processId: string; success: boolean; error: string, stream: AsyncIterable<string> | undefined }> {
29-
const result: {
30-
processId: string;
31-
success: boolean;
32-
error: string;
33-
stream: AsyncIterable<string> | undefined;
34-
} = {
56+
): Promise<IStartFuncProcessResult> {
57+
const result: IStartFuncProcessResult = {
3558
processId: '',
3659
success: false,
3760
error: '',

0 commit comments

Comments
 (0)