File tree 2 files changed +2
-56
lines changed
2 files changed +2
-56
lines changed Original file line number Diff line number Diff line change @@ -36,44 +36,12 @@ export class Client<
36
36
SmithyResolvedConfiguration < HandlerOptions >
37
37
> ,
38
38
options ?: HandlerOptions
39
- ) : Promise < OutputType > ;
40
- send < InputType extends ClientInput , OutputType extends ClientOutput > (
41
- command : Command <
42
- ClientInput ,
43
- InputType ,
44
- ClientOutput ,
45
- OutputType ,
46
- SmithyResolvedConfiguration < HandlerOptions >
47
- > ,
48
- options : HandlerOptions ,
49
- cb : ( err : any , data ?: OutputType ) => void
50
- ) : void ;
51
- send < InputType extends ClientInput , OutputType extends ClientOutput > (
52
- command : Command <
53
- ClientInput ,
54
- InputType ,
55
- ClientOutput ,
56
- OutputType ,
57
- SmithyResolvedConfiguration < HandlerOptions >
58
- > ,
59
- options ?: HandlerOptions ,
60
- cb ?: ( err : any , data ?: OutputType ) => void
61
- ) : Promise < OutputType > | void {
39
+ ) : Promise < OutputType > {
62
40
const handler = command . resolveMiddleware (
63
41
this . middlewareStack as any ,
64
42
this . config ,
65
43
options
66
44
) ;
67
- if ( cb ) {
68
- handler ( command )
69
- . then ( result => cb ( null , result . output ) , ( err : any ) => cb ( err ) )
70
- . catch (
71
- // prevent any errors thrown in the callback from triggering an
72
- // unhandled promise rejection
73
- ( ) => { }
74
- ) ;
75
- } else {
76
- return handler ( command ) . then ( result => result . output ) ;
77
- }
45
+ return handler ( command ) . then ( result => result . output ) ;
78
46
}
79
47
}
Original file line number Diff line number Diff line change @@ -20,28 +20,6 @@ interface InvokeFunction<
20
20
> ,
21
21
options ?: any
22
22
) : Promise < OutputType > ;
23
- < InputType extends InputTypes , OutputType extends OutputTypes > (
24
- command : Command <
25
- InputTypes ,
26
- InputType ,
27
- OutputTypes ,
28
- OutputType ,
29
- ResolvedClientConfiguration
30
- > ,
31
- options : any ,
32
- cb : ( err : any , data ?: OutputType ) => void
33
- ) : void ;
34
- < InputType extends InputTypes , OutputType extends OutputTypes > (
35
- command : Command <
36
- InputTypes ,
37
- InputType ,
38
- OutputTypes ,
39
- OutputType ,
40
- ResolvedClientConfiguration
41
- > ,
42
- options ?: any ,
43
- cb ?: ( err : any , data ?: OutputType ) => void
44
- ) : Promise < OutputType > | void ;
45
23
}
46
24
47
25
/**
You can’t perform that action at this time.
0 commit comments