Skip to Content
defold-typescript
Get startedGuidesAPILibraries
Defold

types

Functions for checking Defold userdata types.

Functions

types.is_hash(var_: unknown): var_ is Hash

Check if passed type is hash.

Parameters

  • var: unknown — Variable to check type

Returns

  • result: boolean — True if passed type is hash

types.is_matrix4(var_: unknown): var_ is Matrix4

Check if passed type is matrix4.

Parameters

  • var: unknown — Variable to check type

Returns

  • result: boolean — True if passed type is matrix4

types.is_quat(var_: unknown): var_ is Quaternion

Check if passed type is quaternion.

Parameters

  • var: unknown — Variable to check type

Returns

  • result: boolean — True if passed type is quaternion

types.is_url(var_: unknown): var_ is Url

Check if passed type is URL.

Parameters

  • var: unknown — Variable to check type

Returns

  • result: boolean — True if passed type is URL

types.is_vector(var_: unknown): var_ is Vector

Check if passed type is vector.

Parameters

  • var: unknown — Variable to check type

Returns

  • result: boolean — True if passed type is vector

types.is_vector3(var_: unknown): var_ is Vector3

Check if passed type is vector3.

Parameters

  • var: unknown — Variable to check type

Returns

  • result: boolean — True if passed type is vector3

types.is_vector4(var_: unknown): var_ is Vector4

Check if passed type is vector4.

Parameters

  • var: unknown — Variable to check type

Returns

  • result: boolean — True if passed type is vector4

On this page