Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "functions"

Index

Functions

exportedFunction

  • exportedFunction(): void
  • This is a simple exported function.

    Returns void

functionWithArguments

  • functionWithArguments(paramZ: string, paramG: any, paramA: INameInterface): number
  • This is a function with multiple arguments and a return value.

    Parameters

    • paramZ: string

      This is a string parameter.

    • paramG: any

      This is a parameter flagged with any. This sentence is placed in the next line.

    • paramA: INameInterface

      This is a parameter pointing to an interface.

      var value:BaseClass = new BaseClass('test');
      functionWithArguments('arg', 0, value);
      

    Returns number

functionWithDefaults

  • functionWithDefaults(valueA?: string, valueB?: number, valueC?: number, valueD?: boolean, valueE?: boolean): string
  • This is a function with a parameter that has a default value.

    Parameters

    • Default value valueA: string = "defaultValue"
    • Default value valueB: number = 100
    • Default value valueC: number = Number.NaN
    • Default value valueD: boolean = true
    • Default value valueE: boolean = false

    Returns string

    The input value or the default value.

functionWithOptionalValue

  • functionWithOptionalValue(requiredParam: string, optionalParam?: string): void
  • This is a function with a parameter that is optional.

    Parameters

    • requiredParam: string

      A normal parameter.

    • Optional optionalParam: string

      An optional parameter.

    Returns void

functionWithRest

  • functionWithRest(...rest: string[]): string
  • This is a function with rest parameter.

    Parameters

    • Rest ...rest: string[]

      Multiple strings.

    Returns string

    The combined string.

genericFunction

  • genericFunction<T>(value: T): T
  • This is a generic function.

    Type parameters

    • T

      The type parameter.

    Parameters

    • value: T

      The typed value.

    Returns T

    Returns the typed value.

internalFunction

  • internalFunction(): void
  • This is an internal function.

    Returns void

multipleSignatures

  • multipleSignatures(value: string): string
  • multipleSignatures(value: object): string
  • This is the first signature of a function with multiple signatures.

    Parameters

    • value: string

      The name value.

    Returns string

  • This is the second signature of a function with multiple signatures.

    Parameters

    • value: object

      An object containing the name value.

      • name: string

        A value of the object.

    Returns string

variableFunction

  • variableFunction(paramZ: string, paramG: any, paramA: INameInterface): number
  • This is a function with multiple arguments and a return value.

    Parameters

    • paramZ: string

      This is a string parameter.

    • paramG: any

      This is a parameter flagged with any. This sentence is placed in the next line.

    • paramA: INameInterface

      This is a parameter pointing to an interface.

      var value:BaseClass = new BaseClass('test');
      functionWithArguments('arg', 0, value);
      

    Returns number

Generated using TypeDoc