[RFC] refactor: remove vestigial generic type parameters from Protocol, Server, and Client (#1451)
This commit is contained in:
parent
7bb79ebbbb
commit
faeb03ec17
1 changed files with 210 additions and 306 deletions
|
|
@ -293,7 +293,7 @@ async function connect(url?: string): Promise<void> {
|
|||
attempts++;
|
||||
console.log(`\nPlease provide the following information (attempt ${attempts}/${maxAttempts}):`);
|
||||
|
||||
const content: Record<string, unknown> = {};
|
||||
const content: Record<string, string | number | boolean | string[]> = {};
|
||||
let inputCancelled = false;
|
||||
|
||||
// Collect input for each field
|
||||
|
|
@ -357,7 +357,7 @@ async function connect(url?: string): Promise<void> {
|
|||
// Parse and validate the input
|
||||
try {
|
||||
if (answer === '' && field.default !== undefined) {
|
||||
content[fieldName] = field.default;
|
||||
content[fieldName] = field.default as string | number | boolean | string[];
|
||||
} else if (answer === '' && !isRequired) {
|
||||
// Skip optional empty fields
|
||||
continue;
|
||||
|
|
@ -401,7 +401,7 @@ async function connect(url?: string): Promise<void> {
|
|||
}
|
||||
}
|
||||
|
||||
content[fieldName] = parsedValue;
|
||||
content[fieldName] = parsedValue as string | number | boolean | string[];
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(`❌ Error: ${error}`);
|
||||
|
|
|
|||
Loading…
Reference in a new issue