Options
All
  • Public
  • Public/Protected
  • All
Menu

Module functions

Index

Functions

createSomething

  • createSomething(): { doAnotherThing: () => void; doSomething: (a: number) => number; foo: string }
  • A function that returns an object. Also no type information is given, the object should be correctly reflected.

    Returns { doAnotherThing: () => void; doSomething: (a: number) => number; foo: string }

    • doAnotherThing: () => void
        • (): void
        • Returns void

    • doSomething: (a: number) => number
        • (a: number): number
        • Parameters

          • a: number

          Returns number

    • foo: string

exportedFunction

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

    Returns void

functionWithArguments

  • functionWithArguments(paramZ: string, paramG: any, paramA: NameInterface): 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: NameInterface

      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

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

    Returns string

    The input value or the default value.

functionWithDocLink

  • functionWithDocLink(): void

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.

moduleFunction

  • moduleFunction(arg: string): string
  • This is a function that is extended by a module.

    Parameters

    • arg: string

      An argument.

    Returns string

multipleSignatures

  • multipleSignatures(value: string): string
  • multipleSignatures(value: { name: string }): 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: { name: string }

      An object containing the name value.

      • name: string

        A value of the object.

    Returns string

Let variableFunction

  • variableFunction(paramZ: string, paramG: any, paramA: NameInterface): 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: NameInterface

      This is a parameter pointing to an interface.

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

    Returns number

Generated using TypeDoc