Giphy / giphy-react-native-sdk

GIPHY React Native SDK
https://developers.giphy.com
Apache License 2.0
67 stars 25 forks source link

[2.4.0] GiphyMedia types are missing #106

Closed efstathiosntonas closed 1 year ago

efstathiosntonas commented 1 year ago

πŸ› Bug Report

GiphyMedia types are missing on 2.4.0 (from https://github.com/Giphy/giphy-react-native-sdk/blob/main/src/dto/giphyMedia.ts)

To Reproduce

(Write your steps here:)

  1. Update to 2.4.0
  2. See screenshot

Screenshot 2023-05-24 at 15 31 07

efstathiosntonas commented 1 year ago

nvm, import has changed to import { GiphyMedia } from "@giphy/react-native-sdk"; instead of import { GiphyMedia } from "@giphy/react-native-sdk/src/giphyMedia";.

It's weird though that IntelliJ could not auto import it or find it.

pshoniuk commented 1 year ago

Hi @efstathiosntonas, thanks for the report. Imports like import { GiphyMedia } from "@giphy/react-native-sdk/*"; has never been officially supported by the GIPHY RN SDK. The GIPHY RN SDK only supports top-level imports, e.g.: import { GiphyMedia } from "@giphy/react-native-sdk";. But it's weird that IntelliJ couldn't auto-import it. On my machine, IntelliJ works as expected.

efstathiosntonas commented 1 year ago

@pshoniuk I guess I fell into the stupid IntelliJ bug (that exists for 3-4 years) that won’t update the context menu on the line unless you try to open it 50 times πŸ˜‚

Edit: the /* import was inserted automatically from IntelliJ in the first place on previous sdk versions πŸ€·β€β™‚οΈ