Closed rkrasiuk closed 4 years ago
What would be the use case for restricting users to one of these particular subsets of CookieAttributes
?
@theodorejb I want to allow the user to configure a subset of cookie attributes. aka the library sets the cookie from user-provided resource (domain), however he might have an option to set a cookie as Strict
or None
I just published v1.3.2 which exports the CookieAttributes
type from the main module. However, I'm not comfortable exporting all the partial types that make it up, since they're really an internal implementation detail which could change and I don't want users to depend on.
If another package developer wants to restrict users to a subset of CookieAttributes
, I think it would be better for them to define their own interface.
Usage:
Allow developers of other packages to restrict users to a subset of CookieAttributes
Allow type guards for users of this package
(I'm being annoying 😅)