Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

closeBehavior enum not exported properly #266

Closed
joelpierre opened this issue Sep 12, 2022 · 7 comments · Fixed by #271
Closed

closeBehavior enum not exported properly #266

joelpierre opened this issue Sep 12, 2022 · 7 comments · Fixed by #271

Comments

@joelpierre
Copy link

Screenshot 2022-09-12 at 23 44 29

Can't use the enum that is apparently exported 😅 and when I try to pass the prop it fails

Screenshot 2022-09-12 at 23 46 49

@edsonjab
Copy link
Contributor

Hi @joelpierre the correct path for CloseBehavior is
@segment/consent-manager/container

you can check out storybook here

@mattkoch-bb
Copy link

mattkoch-bb commented Sep 14, 2022

Hi @joelpierre the correct path for CloseBehavior is @segment/consent-manager/container

you can check out storybook here

Hi @edsonjab ! If I try to import this enum, I get the following...

image

@joelpierre
Copy link
Author

Yep same @mattkoch-bb, it isn't exported from that location @edsonjab . I think the issue is when you build for production the type definitions are in a completely different location so TS gets a bit confused, typically they would be exported from the "same" path just the build/dist folder instead.

@mattkoch-bb
Copy link

@joelpierre How'd you get around it? :-D

@joelpierre
Copy link
Author

@joelpierre How'd you get around it? :-D

The dreaded "..." as any

@mattkoch-bb
Copy link

mattkoch-bb commented Sep 14, 2022

"..." as any

In your import statement somewhere, @joelpierre ?

@joelpierre
Copy link
Author

const closeBehavior = 'accept' as any;
...
closeBehavior={closeBehavior}
...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants