Api

MethodJudgetypeconstantvariable

OpenAPI > Method > JudgeTypeConstantVariable

OpenAPI.Method.JudgeTypeConstantVariable() method

判断常量变量类型

Signature:

static JudgeTypeConstantVariable(constant: any, variable: number, index_type: number, variable_type?: number): any;

Parameters

Parameter

Type

Description

constant

any

常量

variable

number

变量

index_type

number

选项类型 0 = 常量 1 = 变量

variable_type

number

(Optional) 【默认数值】变量类型 0 = 数值, 1 = 字符串, 2 = 开关(返回 0 = 关闭, 1 = 开启)

any

Example

const variable_value = OpenAPI.Method.JudgeTypeConstantVariable(1, 1, 0) // 返回 1

Copyright © 2021 - 2025