typescript – Cannot import type interfaces of AWS js sdk v3

I am using AWS pinpoint service with typescript. And I want to define return type for GetSegmentCommand’s output. The docs says that it is exported as this:

export interface GetSegmentCommandOutput extends GetSegmentResponse, MetadataBearer

But when I try to use it in my project like this:

import { PinpointClient, GetSegmentCommand, GetSegmentCommandOutput } from '@aws-sdk/client-pinpoint';

typescript compiler gives off this error:
GetSegmentCommandOutput not found in ‘@aws-sdk/client-pinpoint’

What could be the reason for it.? And if I am making any mistake, how can I do it correctly.?

Looked at the docs of typescript.
Confirmed within node_modules package of @aws-sdk/client-pinpoint to verify that they actually export the interface.

Read more here: Source link