Skip to content

FFM-10409 Mark targets as optional for variation methods #103

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

Merged
merged 2 commits into from
Jan 16, 2024

Conversation

erdirowlands
Copy link
Contributor

@erdirowlands erdirowlands commented Jan 16, 2024

What

We allow targets to to undefined when calling variation methods, but if "strictNullChecks": true is enabled in a Typescript project, then passing an undefined target will result in a compilation fail.
This marks the target as explicitly optional for all variation methods.

Testing

Manual:

  1. with project that enabled strictNullChecks and passed undefined targets and real targets with targeting rules enabled on each flag type.
  2. with project with no strictNullChecks for undefined and real targets with targeting rules enabled on each flag type.
  3. Metrics post for each of the above scenarios correctly.

@erdirowlands erdirowlands merged commit ed00f80 into main Jan 16, 2024
@erdirowlands erdirowlands deleted the FFM-10409 branch January 16, 2024 13:36
@knagurski
Copy link
Contributor

Looks like you might have forgotten about the functions in index.ts

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

Successfully merging this pull request may close these issues.

3 participants