Closed Easy-Cloud-in closed 4 months ago
Hi @Easy-Cloud-in ,
I'm not sure why you are seeing this error. I'm able to run tsc on this code without any errors:
import { ApiGatewayManagementApiClient, DeleteConnectionCommand } from "@aws-sdk/client-apigatewaymanagementapi";
const client = new ApiGatewayManagementApiClient({region: "us-east-1"});
const input = { ConnectionId: "STRING_VALUE" };
const command = new DeleteConnectionCommand(input);
async function foo(){
try {
const response = await client.send(command)
console.log(response)
}catch(err){
console.log(err)
}
}
foo()
$ ls
node_modules package-lock.json package.json sample.ts
$ tsc sample.ts
$ ls
node_modules package-lock.json package.json sample.js sample.ts
which SDK version and TS version are you using? Can I see the contents of your package.json
and tsconfig
if you have one?
Thanks, Ran~
This issue has not received a response in 1 week. If you still think there is a problem, please leave a comment to avoid the issue from automatically closing.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.
Describe the issue
Property 'send' does not exist on type 'ApiGatewayManagementApiClient'
Links
https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/apigatewaymanagementapi/command/DeleteConnectionCommand/