@vtj / Modules / core / PropModel
Class: PropModel
core.PropModel
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new PropModel(name
, value?
, defaultValue?
): PropModel
Parameters
Name | Type |
---|---|
name | string |
value? | JSONValue | JSExpression | JSFunction |
defaultValue? | JSONValue | JSExpression | JSFunction |
Returns
Defined in
packages/core/src/models/prop.ts:13
Properties
defaultValue
• Optional
defaultValue: JSONValue
| JSExpression
| JSFunction
Defined in
packages/core/src/models/prop.ts:16
isUnset
• isUnset: boolean
= false
标识是否设置了值, 设置的值与默认值一致,表示未设置,在转换成dsl时会排查该属性
Defined in
packages/core/src/models/prop.ts:12
name
• name: string
Defined in
packages/core/src/models/prop.ts:14
value
• Optional
value: JSONValue
| JSExpression
| JSFunction
Defined in
packages/core/src/models/prop.ts:15
Methods
getValue
▸ getValue(): JSONValue
| JSExpression
| JSFunction
Returns
JSONValue
| JSExpression
| JSFunction
Defined in
packages/core/src/models/prop.ts:24
setValue
▸ setValue(value
): void
Parameters
Name | Type |
---|---|
value | JSONValue | JSExpression | JSFunction |
Returns
void
Defined in
packages/core/src/models/prop.ts:20
parse
▸ parse(props?
): Record
<string
, PropModel
>
Parameters
Name | Type |
---|---|
props | NodeProps |
Returns
Record
<string
, PropModel
>
Defined in
packages/core/src/models/prop.ts:36
toDsl
▸ toDsl(props?
): NodeProps
Parameters
Name | Type |
---|---|
props | Record <string , PropModel > |
Returns
Defined in
packages/core/src/models/prop.ts:27