Files
NapCatQQ/.pnpm-store/v3/files/a3/e95ca8d9b3e9969d5a54c186f9e6fab38248309af728827a7996305ce7e5a6c548bca03828c709d4e0ed91faa6242335273fa65be4e7c16084d1dd6034cabd
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

40 lines
1.9 KiB
Plaintext

/**
* Fixes sort order of prop types.
*
* @param {Context} context the second element to compare.
* @param {Fixer} fixer the first element to compare.
* @param {Array} declarations The context of the two nodes.
* @param {boolean=} ignoreCase whether or not to ignore case when comparing the two elements.
* @param {boolean=} requiredFirst whether or not to sort required elements first.
* @param {boolean=} callbacksLast whether or not to sort callbacks after everything else.
* @param {boolean=} noSortAlphabetically whether or not to disable alphabetical sorting of the elements.
* @param {boolean=} sortShapeProp whether or not to sort propTypes defined in PropTypes.shape.
* @param {boolean=} checkTypes whether or not sorting of prop type definitions are checked.
* @returns {Object|*|{range, text}} the sort order of the two elements.
*/
export function fixPropTypesSort(context: Context, fixer: Fixer, declarations: any[], ignoreCase?: boolean | undefined, requiredFirst?: boolean | undefined, callbacksLast?: boolean | undefined, noSortAlphabetically?: boolean | undefined, sortShapeProp?: boolean | undefined, checkTypes?: boolean | undefined): any | any | {
range;
text;
};
/**
* Checks if the proptype is a callback by checking if it starts with 'on'.
*
* @param {string} propName the name of the proptype to check.
* @returns {boolean} true if the proptype is a callback.
*/
export function isCallbackPropName(propName: string): boolean;
/**
* Checks if the prop is required or not.
*
* @param {ASTNode} node the prop to check.
* @returns {boolean} true if the prop is required.
*/
export function isRequiredProp(node: ASTNode): boolean;
/**
* Checks if the prop is PropTypes.shape.
*
* @param {ASTNode} node the prop to check.
* @returns {boolean} true if the prop is PropTypes.shape.
*/
export function isShapeProp(node: ASTNode): boolean;
//# sourceMappingURL=propTypesSort.d.ts.map