Options
All
  • Public
  • Public/Protected
  • All
Menu

scripts-sdk-as

Index

Type aliases

Float

Float: f64

Int

Int: i32

Variables

Let functionMapping

functionMapping: Map<string, (buffer: ArrayBuffer) => ArrayBuffer> = new Map<string, (buffer: ArrayBuffer) => ArrayBuffer>()

Functions

assertValidType

  • assertValidType<T>(): void
  • This method checks the type of T and throws if the type is not valid. This runtime check is used because we can't restrict the bounds of T at compile time due to current AS limitations.

    Type parameters

    • T

    Returns void

fetchExtensionPoint

  • fetchExtensionPoint(inputBuffer: ArrayBuffer): string
  • Parameters

    • inputBuffer: ArrayBuffer

    Returns string

fetchInputBuffer

  • fetchInputBuffer(): ArrayBuffer
  • Returns ArrayBuffer

inputCopy

  • inputCopy(ptr: ArrayBuffer): u16
  • Parameters

    • ptr: ArrayBuffer

    Returns u16

inputLen

  • inputLen(lenPtr: usize): u16
  • Parameters

    • lenPtr: usize

    Returns u16

outputCopy

  • outputCopy(ptr: ArrayBuffer, len: usize): u16
  • Parameters

    • ptr: ArrayBuffer
    • len: usize

    Returns u16

registerFunction

  • registerFunction(executionContext: string, fn: (buffer: ArrayBuffer) => ArrayBuffer): void
  • Parameters

    • executionContext: string
    • fn: (buffer: ArrayBuffer) => ArrayBuffer
        • (buffer: ArrayBuffer): ArrayBuffer
        • Parameters

          • buffer: ArrayBuffer

          Returns ArrayBuffer

    Returns void

run

  • run(): void
  • Returns void

safeInputCopy

  • safeInputCopy(ptr: ArrayBuffer): void
  • Parameters

    • ptr: ArrayBuffer

    Returns void

safeInputLen

  • safeInputLen(lenPtr: usize): void
  • Parameters

    • lenPtr: usize

    Returns void

safeOutputCopy

  • safeOutputCopy(ptr: ArrayBuffer, len: usize): void
  • Parameters

    • ptr: ArrayBuffer
    • len: usize

    Returns void

safeParseInt

  • safeParseInt(v: string, radix?: i32): i64
  • A function that is similar to parseInt(2). This safeParseInt returns an error when the value is not a number (NaN) or is not a valid integer.

    Parameters

    • v: string

      Value to convert to an integer

    • Default value radix: i32 = 0

      Optional radix

    Returns i64

Generated using TypeDoc