Skip to content

Commit f51adeb

Browse files
committed
删除无用类型
1 parent bb81db0 commit f51adeb

4 files changed

Lines changed: 2 additions & 25 deletions

File tree

packages/sdk-core/src/client/Client.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,6 @@ export class Client {
114114
commandName: command.constructor.name,
115115
clientConfig: this.config,
116116
contentType: command.requestConfig?.contentType || "",
117-
castMap: {
118-
requestMap: command.requestMap,
119-
responseMap: command.responseMap,
120-
},
121-
skipResponseCasting: options?.skipResponseCasting,
122117
};
123118
const handler = stack.resolve(async (args: Args) => args, context);
124119

@@ -190,10 +185,9 @@ export class Client {
190185
*/
191186
debugMiddlewareStack<
192187
TInput extends CommandInput,
188+
TOutput extends any,
193189
TCommandName extends keyof CommandOutputMap
194-
>(
195-
command: Command<TInput, CommandOutputMap[TCommandName], TCommandName>
196-
): string {
190+
>(command: Command<TInput, TOutput, TCommandName>): string {
197191
const mergedStack = this.middlewareStack.merge(command.middlewareStack);
198192
return mergedStack.toString();
199193
}

packages/sdk-core/src/command/Command.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ export class Command<
1919
pathname?: string;
2020
contentType?: string;
2121
};
22-
requestMap?: Record<string, any>;
23-
responseMap?: Record<string, any>;
2422

2523
protected __type?: {
2624
output: TOutput;

packages/sdk-core/src/middlewares/types.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,6 @@ export interface MiddlewareContext {
4141
* Content type for the request
4242
*/
4343
contentType?: string;
44-
/**
45-
* Map of type casts for request and response data
46-
*/
47-
castMap?: {
48-
requestMap?: Record<string, any>;
49-
responseMap?: Record<string, any>;
50-
};
51-
/**
52-
* Whether to skip response casting
53-
*/
54-
skipResponseCasting?: boolean;
5544
}
5645

5746
/**

packages/sdk-core/src/types/types.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,6 @@ export interface SendOptions {
134134
* Overrides client-level httpOptions.timeout
135135
*/
136136
timeout?: number;
137-
/**
138-
* Whether to skip response casting (converting PascalCase to camelCase)
139-
*/
140-
skipResponseCasting?: boolean;
141137
}
142138

143139
// ============================================================================

0 commit comments

Comments
 (0)