-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Break out tcf URLs and dataRetention into their own codecs #96
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a minor suggestion. (Then in createTCFVendors.ts
you could put
urls: decodeCodec(t.array(TcfGvlV3Url), urls);
for instance.
src/iab.ts
Outdated
export const TcfGvlV3Urls = t.array( | ||
t.intersection([ | ||
t.type({ langId: t.string, privacy: t.string }), | ||
t.partial({ | ||
legIntClaim: t.string, | ||
}), | ||
]), | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find
export const TcfGvlV3Urls = t.array( | |
t.intersection([ | |
t.type({ langId: t.string, privacy: t.string }), | |
t.partial({ | |
legIntClaim: t.string, | |
}), | |
]), | |
); | |
export const TcfGvlV3Url = t.intersection([ | |
t.type({ langId: t.string, privacy: t.string }), | |
t.partial({ | |
legIntClaim: t.string, | |
}), | |
]); |
a little more flexible. It's easier to wrap a type in t.array
than to unravel it if you need.
src/iab.ts
Outdated
]), | ||
), | ||
dataRetention: TcfGvlV3DataRetention, | ||
urls: TcfGvlV3Urls, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
urls: TcfGvlV3Urls, | |
urls: t.array(TcfGvlV3Url), |
following the above suggestion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhh it much more flexible now! I made the change and it should be ready for re-review! Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌🏼
Related Issues
Security Implications
[none]
System Availability
[none]