Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "ys/ys"

Index

Type aliases

Double

Double: number

Int32

Int32: number

Int64

Int64: bigint

Nullable

Nullable<T>: T | null

Type parameters

  • T

Functions

arrayToSet

  • arrayToSet<T>(value: keyof T[]): Set<T>
  • The function must have a counterpart in Native world. It converts Array value to Set.

    Type parameters

    • T

    Parameters

    • value: keyof T[]

      value to convert to Set

    Returns Set<T>

booleanToInt32

  • booleanToInt32(value: boolean): Int32
  • The function must have a counterpart in Native world. It converts boolean value to Int32.

    Parameters

    • value: boolean

      value to convert to Int32

    Returns Int32

cast

  • cast<T, U>(array: keyof T[]): keyof U[]
  • This function must be used to cast arrays as Swift YSArray is invariant over T (Swift restrictions) In order to emulate covariance, one should use the function in TS, and cast call will be generated in Swift. Swift function must be implemented like this: public func cast<T, U>(_ array: YSArray) -> YSArray { return YSArray(array: array.map { (item) in item as! U }) }

    Type parameters

    • T

    • U

    Parameters

    • array: keyof T[]

      Array to cast

    Returns keyof U[]

castToAny

  • castToAny<T>(value: T): any
  • Type parameters

    • T

    Parameters

    • value: T

    Returns any

decrementalRange

  • Parameters

    Returns Iterable<Int32>

doubleToInt32

  • The function must have a counterpart in Native world. It converts Double value to Int32, by truncating.

    Parameters

    • value: Double

      value to convert to Int32

    Returns Int32

doubleToInt64

  • The function must have a counterpart in Native world. It converts Double value to Int64, by truncating.

    description

    The function properly processes only Doubles with integer part in range -2^53..+2^53

    Parameters

    • value: Double

      value to convert to Int64

    Returns Int64

doubleToString

  • doubleToString(value: Double): string
  • The function must have a counterpart in Native world. It converts Double value to string.

    Parameters

    • value: Double

      value to convert to string

    Returns string

int32ToBoolean

  • int32ToBoolean(value: Int32): boolean
  • The function must have a counterpart in Native world. It converts Int32 value to boolean.

    Parameters

    • value: Int32

      value to convert to boolean

    Returns boolean

int32ToInt64

  • The function must have a counterpart in Native world. It converts Int32 value to Int64

    Parameters

    • value: Int32

      value to convert to Int64

    Returns Int64

int32ToString

  • int32ToString(value: Int32): string
  • The function must have a counterpart in Native world. It converts Int32 value to string.

    Parameters

    • value: Int32

      value to convert to string

    Returns string

int64

  • The function must have a counterpart in Native world. It converts numeric values to Int64.

    description

    The function will be obsolete as soon as Jest supports bigint literals out of the box (v25)

    Parameters

    Returns Int64

int64ToDouble

  • The function must have a counterpart in Native world. It converts Int64 value to Double.

    Parameters

    • value: Int64

      value to convert to Double

    Returns Double

int64ToInt32

  • The function must have a counterpart in Native world. It converts Int64 value to Int32. It should loose presision if overflown.

    Parameters

    • value: Int64

      value to convert to Int32

    Returns Int32

int64ToString

  • int64ToString(value: Int64): string
  • The function must have a counterpart in Native world. It converts Int64 value to string.

    Parameters

    • value: Int64

      value to convert to string

    Returns string

iterableToArray

  • iterableToArray<T>(value: IterableIterator<T>): T[]
  • The function must have a counterpart in Native world. It converts Iterable value to Array.

    Type parameters

    • T

    Parameters

    • value: IterableIterator<T>

      value to convert to Array

    Returns T[]

iterableToSet

  • iterableToSet<T>(value: IterableIterator<T>): Set<T>
  • The function must have a counterpart in Native world. It converts Iterable value to Set.

    Type parameters

    • T

    Parameters

    • value: IterableIterator<T>

      value to convert to Set

    Returns Set<T>

nullthrows

  • nullthrows<T>(value: T | undefined | null): T
  • Type parameters

    • T

    Parameters

    • value: T | undefined | null

    Returns T

range

  • Parameters

    Returns Iterable<Int32>

setToArray

  • setToArray<T>(value: ReadonlySet<T>): T[]
  • The function must have a counterpart in Native world. It converts Set value to Array.

    Type parameters

    • T

    Parameters

    • value: ReadonlySet<T>

      value to convert to Array

    Returns T[]

stringToDouble

  • The function must have a counterpart in Native world. It converts string value to Double.

    Parameters

    • value: string

      value to convert to Double

    Returns Nullable<Double>

stringToInt32

  • The function must have a counterpart in Native world. It converts string value to Int32.

    Parameters

    • value: string

      value to convert to Int32

    • Default value radix: Int32 = 10

    Returns Nullable<Int32>

stringToInt64

  • The function must have a counterpart in Native world. It converts string value to Int64.

    description

    The function evaluates the argument. It analyzes the first two symbols of the string: if it starts with '0x', it's treated as a hexadecimal number; if it starts with '0b', it's treated as a binary number; if it starts with neither of the above, it's treated as a decimal number.

    Parameters

    • value: string

      value to convert to Int64.

    Returns Nullable<Int64>

undefinedToNull

  • undefinedToNull<T>(value: T | undefined | null): Nullable<T>
  • The Native function counterpart should basically be an identity function from nullable to nullable.

    Type parameters

    • T

    Parameters

    • value: T | undefined | null

      value to convert to Int64

    Returns Nullable<T>

weak

  • weak(target: any, propertyKey: string): void
  • Parameters

    • target: any
    • propertyKey: string

    Returns void

weakThis

  • weakThis<F>(f: F): F
  • Type parameters

    • F: Function

    Parameters

    • f: F

    Returns F

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc