function processPropDefs(props, otherDefaultProvider) {
      /** @type {PropDefaultFunctionContext[]} */
      const propContexts = []
      for (const prop of props) {
        let typeList
        /** @type {DefaultDefine[]} */
        const defaultList = []
        if (prop.type === 'object') {
          if (prop.value.type === 'ObjectExpression') {
            const type = getPropertyNode(prop.value, 'type')
            if (!type) continue

            typeList = getTypes(type.value)

            const def = getPropertyNode(prop.value, 'default')
            if (def) {
              defaultList.push({
                src: 'defaultProperty',
                expression: def.value
              })
            }
          } else {
            typeList = getTypes(prop.value)
          }
        } else {
          typeList = prop.types
        }
        if (prop.propName != null) {
          defaultList.push(...otherDefaultProvider(prop.propName))
        }

        if (defaultList.length === 0) continue

        const typeNames = new Set(
          typeList.filter((item) => NATIVE_TYPES.has(item))
        )
        // There is no native types detected
        if (typeNames.size === 0) continue

        for (const defaultDef of defaultList) {
          const defType = getValueType(defaultDef.expression)

          if (!defType) continue

          if (defType.function) {
            if (typeNames.has('Function')) {
              continue
            }
            if (defaultDef.src === 'assignment') {
              // Factory functions cannot be used in default definitions with initial value assignments.
              report(defaultDef.expression, prop, typeNames)
              continue
            }
            if (defType.expression) {
              if (!defType.returnType || typeNames.has(defType.returnType)) {
                continue
              }
              report(defType.functionBody, prop, typeNames)
            } else {
              propContexts.push({
                prop,
                types: typeNames,
                default: defType
              })
            }
          } else {
            if (typeNames.has(defType.type)) {
              if (defaultDef.src === 'assignment') {
                continue
              }
              if (!FUNCTION_VALUE_TYPES.has(defType.type)) {
                // For Array and Object, defaults must be defined in the factory function.
                continue
              }
            }
            report(
              defaultDef.expression,
              prop,
              defaultDef.src === 'assignment'
                ? typeNames
                : [...typeNames].map((type) =>
                    FUNCTION_VALUE_TYPES.has(type) ? 'Function' : type
                  )
            )
          }
        }
      }
      return propContexts
    }
@param {(ComponentObjectProp | ComponentTypeProp | ComponentInferTypeProp)[]} props
@param {(propName: string) => Iterable<DefaultDefine>} otherDefaultProvider