Skip to content
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

Add validation function to declaration options #1398

Merged
merged 6 commits into from Nov 27, 2020
Merged

Add validation function to declaration options #1398

merged 6 commits into from Nov 27, 2020

Conversation

krisztianb
Copy link
Contributor

Fixes #1316

Overview:

  • New validate property for declaration options
  • New tests for the new properties

Please pay attention to line 279 in src/lib/utils/options/declaration.ts. I removed one of the signatures. This enables TS's type refinement and thence no more type assertion is required when accessing the option. I don't know if this breaks anything else.

Copy link
Collaborator

@Gerrit0 Gerrit0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to pull it down and play with it, I suspect that the signature changes are okay

src/lib/utils/options/declaration.ts Outdated Show resolved Hide resolved
src/lib/utils/options/declaration.ts Outdated Show resolved Hide resolved
src/lib/utils/options/declaration.ts Outdated Show resolved Hide resolved
src/lib/utils/options/declaration.ts Outdated Show resolved Hide resolved
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Nov 26, 2020

Travis is entirely too slow... will merge as soon as it passes, want to pull it into 0.20.

@Gerrit0 Gerrit0 merged commit 884332b into TypeStrong:master Nov 27, 2020
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.

Validation function for string declaration options
2 participants