flags icon indicating copy to clipboard operation
flags copied to clipboard

getFlags function has TS issue

Open unoscar opened this issue 2 years ago • 3 comments

Hi there, I am using the flags implementation into a next.js project with TS, when creating the getFlags function I get the following error:

Exported variable 'getFlags' has or is using name 'FactoryGetFlagsOptions' from external module "/home/unoscar/workspace/src/github.com/bd-dashboard/main-platform/node_modules/@happykit/flags/dist/server" but cannot be named.ts(4023)

I believe this can get fixed by just exporting the FactoryGetFlagsOptions interface.

I'll be creating a fork with the fix and a PR, but in case it help to have the issue recorded here. Cheers

unoscar avatar Jan 14 '23 15:01 unoscar

Interesting, as I've not seen that before.

How are you importing getFlags in your code? Could you copy the import line here?

Are you maybe importing from @happykit/flags/dist/server instead of @happykit/flags/server?

dferber90 avatar Jan 16 '23 09:01 dferber90

hi im having this problem as well i think an export on line 18 does the trick.

Screenshot 2023-04-17 at 11 52 01 AM

karmatradeDev avatar Apr 17 '23 16:04 karmatradeDev

@karmatradeDev Could you show the source code of the file where you are seeing this error?

dferber90 avatar Apr 18 '23 05:04 dferber90