Home Reference Source
public class | source

Type

Extends:

hookies~HooksPubSubBaseObject → Type

Implementation of the Rule Type class. Type is responsible for the rule string e.g. can watch validation and for extracting all relevant infos out of that string.

Constructor Summary

Public Constructor
public

constructor(rule: *, str: *)

Member Summary

Public Members
public

raw: *

Just store the given string.

public

rule: *

Reference to a original rule

public

type: *

Method Summary

Public Methods
public

isNegative(): *

Opposite of isPositive() method.

public

isPositive(): *

can rules are positive cannot rules are negative.

public

Throws an error if the type of the rule is not applicable.

Inherited Summary

From class PubSub
public

trigger(name: *, args: ...*): *

Trigger all events synchronously by default

public

triggerAsync(args: ...*): *

Trigger asynchronously

Public Constructors

public constructor(rule: *, str: *) source

Params:

NameTypeAttributeDescription
rule *
str *

Public Members

public raw: * source

Just store the given string. Used internally by Type class.

public rule: * source

Reference to a original rule

public type: * source

Public Methods

public isNegative(): * source

Opposite of isPositive() method.

Return:

*

public isPositive(): * source

can rules are positive cannot rules are negative.

Return:

*

public validate(): boolean source

Throws an error if the type of the rule is not applicable.

Return:

boolean