Options
All
  • Public
  • Public/Protected
  • All
Menu

Class IntegerProp

A Number node. This will validate the value it is connected with and render it down

Hierarchy

Indexable

[key: string]: any

A Number node. This will validate the value it is connected with and render it down

Index

Constructors

constructor

  • new IntegerProp(node: any, name: string): IntegerProp

Properties

classSourcePath

classSourcePath: string | null

The path to the the prooperty from the base property

Optional defaultValue

defaultValue: any

A default value for the property

Optional description

description: undefined | string

Detailed documentation

Optional empty

empty: any

Checks if given value is empty (=== '', === null, === undefined).

Optional equals

equals: any

Checks if value equals ("===") comparison

Optional isDefined

isDefined: any

Checks if value is defined (!== undefined, !== null). This is the only decorator that ignores skipMissingProperties option.

Optional isDivisibleBy

isDivisibleBy: undefined | number

Checks if the value is a number that's divisible by another.

Optional isIn

isIn: any[]

Checks if value is in a array of allowed values.

Optional isNegative

isNegative: undefined | false | true

IsNegative

Optional isNotIn

isNotIn: any[]

Checks if value is not in a array of disallowed values.

Optional isOptional

isOptional: undefined | false | true

Checks if given value is empty (=== null, === undefined) and if so, ignores all the validators on the property.

Optional isPositive

isPositive: undefined | false | true

Checks if the value is a positive number.

Optional max

max: undefined | number

Checks if the given number is less than or equal to given number.

Optional min

min: undefined | number

Checks if the given number is greater than or equal to given number.

name

name: string

The name of the symbol

Optional notEmpty

notEmpty: any

Checks if given value is empty (=== '', === null, === undefined).

Optional notEquals

notEquals: any

Checks if value equals ("===") comparison.

Protected ownDecorator

ownDecorator: string = "IsString"

The prop instance's own type decorator

reportedType

reportedType: string

The type that was defined in the json/yaml

Protected sys

sys: LoDashStatic = sys

A local for templates to access lodash

Optional title

title: undefined | string

Short documentation

typeName

typeName: string = ""

The name typescript expects for the type

Accessors

prop

  • get prop(): string

Methods

Protected decs

  • decs(): string[]

headers

  • headers(): string[]
  • Things like extra classes and enums that need to be at the top level of the module

    Returns string[]

imports

  • imports(): string[]

renderDeclarations

  • renderDeclarations(): string[]

renderProp

  • renderProp(): string

validationImports

  • validationImports(): string[]

Object literals

Protected defaultTemplateOptions

defaultTemplateOptions: object

The default options for the template render

compileDebug

compileDebug: boolean = false

debug

debug: boolean = false

rmWhitespace

rmWhitespace: boolean = false

escape

  • escape(s: any): any

propToTemplate

propToTemplate: object

The map from property to template decorators of the class validator class

empty

empty: string = "IsEmpty"

equals

equals: string = "Equals"

isDefined

isDefined: string = "IsDefined"

isIn

isIn: string = "IsIn"

isNotIn

isNotIn: string = "IsNotIn"

notEmpty

notEmpty: string = "NotEmpty"

notEquals

notEquals: string = "NotEquals"

Generated using TypeDoc