@heybox/hb-sdk API Reference - v0.9.5
    正在准备搜索索引...

    函数 parseMiniappCategory

    • 校验项目配置或产物中的小程序类别。

      参数

      • value: unknown

        待校验值,只接受 tool、game、other 或 undefined;不做 trim 或大小写转换。

      • sourceLabel: string = 'package.json#heybox.category'

        错误消息中的字段来源,默认 package.json#heybox.category。

      返回 MiniappCategory | undefined

      合法类别原值;输入 undefined 时返回 undefined,由发布流程另行检查是否必填。

      Error 输入为其他值(包括 null 或空字符串)时抛出带字段来源的错误。

      0.8.3