From 64874d644b439739a87b2b2969a63ad5d63fa2e5 Mon Sep 17 00:00:00 2001 From: Aria Minaei Date: Sat, 9 Apr 2022 17:12:52 +0200 Subject: [PATCH] Add comments to `validateCommonOpts()` --- theatre/core/src/propTypes/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/theatre/core/src/propTypes/index.ts b/theatre/core/src/propTypes/index.ts index d463c53..db8ef33 100644 --- a/theatre/core/src/propTypes/index.ts +++ b/theatre/core/src/propTypes/index.ts @@ -23,6 +23,13 @@ import {propTypeSymbol} from './internals' // Composite types are not directly sequenceable yet. Their simple sub/ancestor props are. // We’ll 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) => { if (process.env.NODE_ENV !== 'production') { if (opts === undefined) return