Skip to content
ConcordConcordConcord

Type

Helper module to do easy type checking for Concord types

If the concord folder is in the root directory of your game, you can import this module like so:

Type = require('concord.type')

Returns true if the value is a function or has a __call metamethod.

boolean = Type.isCallable( t )
Name Type Description
t any Object to check
Name Type Description
boolean boolean

Returns if object is an Entity.

boolean = Type.isEntity( t )
Name Type Description
t any Object to check
Name Type Description
boolean boolean

Returns if object is a ComponentClass.

boolean = Type.isComponentClass( t )
Name Type Description
t any Object to check
Name Type Description
boolean boolean

Returns if object is a Component.

boolean = Type.isComponent( t )
Name Type Description
t any Object to check
Name Type Description
boolean boolean

Returns if object is a SystemClass.

boolean = Type.isSystemClass( t )
Name Type Description
t any Object to check
Name Type Description
boolean boolean

Returns if object is a System.

boolean = Type.isSystem( t )
Name Type Description
t any Object to check
Name Type Description
boolean boolean

Returns if object is a World.

boolean = Type.isWorld( t )
Name Type Description
t any Object to check
Name Type Description
boolean boolean

Returns if object is a Filter.

boolean = Type.isFilter( t )
Name Type Description
t any Object to check
Name Type Description
boolean boolean