Add comments to validateCommonOpts()

This commit is contained in:
Aria Minaei 2022-04-09 17:12:52 +02:00
parent 72ada325be
commit 64874d644b

View file

@ -23,6 +23,13 @@ import {propTypeSymbol} from './internals'
// Composite types are not directly sequenceable yet. Their simple sub/ancestor props are. // Composite types are not directly sequenceable yet. Their simple sub/ancestor props are.
// Well provide a nice UX to manage keyframing of multiple sub-props. // Well provide a nice UX to manage keyframing of multiple sub-props.
/**
* Validates the common options given to all prop types, such as `opts.label`
*
* @param fnCallSignature - See references for examples
* @param opts - The common options of all prop types
* @returns void - will throw if options are invalid
*/
const validateCommonOpts = (fnCallSignature: string, opts?: CommonOpts) => { const validateCommonOpts = (fnCallSignature: string, opts?: CommonOpts) => {
if (process.env.NODE_ENV !== 'production') { if (process.env.NODE_ENV !== 'production') {
if (opts === undefined) return if (opts === undefined) return