[@types/prop-types] Add support of as const to oneOf#34706
[@types/prop-types] Add support of as const to oneOf#34706sandersn merged 2 commits intoDefinitelyTyped:masterfrom ibezkrovnyi:prop-types-fix-oneof
as const to oneOf#34706Conversation
|
@ibezkrovnyi Thank you for submitting this PR! 🔔 @DovydasNavickas @ferdaber @eps1lon - please review this PR in the next few days. Be sure to explicitly select If no reviewer appears after a week, a DefinitelyTyped maintainer will review the PR instead. |
|
@ibezkrovnyi The Travis CI build failed! Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! |
IssueIssue is in TestedAfter reverting my changes (using master branch): typescript@3.4.3: ✔️ no issue @RyanCavanaugh could you please advise what should I do - while issue with recompose isn't related to this PR, Travis CI build of this PR failed |
|
|
|
|
Derp, I went the opposite way. Sounds good, thanks for the clarification! |
|
Removed non-consistent periods in JSDoc to trigger CI build |
|
A definition owner has approved this PR ⭐️. A maintainer will merge this PR shortly. If it shouldn't be merged yet, please leave a comment saying so and we'll wait. Thank you for your contribution to DefinitelyTyped! |
|
I just published |
…ed#34706) * Add readonly modifier to oneOf definition * remove unnecessary periods, trigger ci build



Common way before microsoft/TypeScript#29510 was to use
tupletrickAfter microsoft/TypeScript#29510 has landed we could use
as constSome evidence
tupleis pretty common approach, for example, it is used in ant.designChange
Change is to replace type
T[]ofoneOfparameter withReadonlyArray<T>.This change relaxes requirement for an Array.
Tested
This change was tested on my project and I used
as constin part of code location, while keeping old way for another part of code locations. Both old and new ways work fine.