Missing type exports

[Problem/Question]
I am trying to implement MediaServiceInterface and some types seem to be missing from the exports: VideoProps, GetVideoThumbnailOptions, and CompressImageOptions


// If problem, please fill out the below. If question, please delete.
[UIKit Version]
3.0.4

[Reproduction Steps]
Try to add this code to a project. See typescript errors:

import { MediaServiceInterface } from '@sendbird/uikit-react-native';

const MediaService: MediaServiceInterface = {
  VideoComponent<Props = {}>(props: VideoProps & Props): JSX.Element {
    throw new Error('Function not implemented.');
  },
  getVideoThumbnail(options: GetVideoThumbnailOptions): Promise<{ path: string }> {
    throw new Error('Function not implemented.');
  },
  compressImage(options: CompressImageOptions): Promise<{ uri: string; size: number }> {
    throw new Error('Function not implemented.');
  },
};

export default MediaService;

[Frequency]
n/a. It’s a build problem

[Current impact]
I can’t use the types specified on the interface

Hello, I apologize for the inconvenience.
We are planning to export the types used together in the next release.

For now, would you like to try removing the automatically added types? Typically, when you specify types for variables, the parameters and return types of functions are automatically inferred.

image

Alternatively, if you are using TypeScript 4.9 or above, you can try using the satisfies keyword.

Thank you.

1 Like