Type alias IdentifierResolutionFunction<ProgramState>

IdentifierResolutionFunction<ProgramState>: ((identifier) => {
    bytecode: Uint8Array;
    source: CompilationResultSuccess<ProgramState>;
    status: true;
    type: script;
} | {
    bytecode: Uint8Array;
    status: true;
    type: opcode;
} | {
    error: string;
    scriptId: string;
    status: false;
    type: script;
} | {
    error: string;
    status: false;
    type: unknown;
} | ResolutionDebug & ResolutionSignature & {
    bytecode: Uint8Array;
    status: true;
    type: variable;
} | ResolutionDebug & {
    entityOwnership?: string;
    error: string;
    recoverable: boolean;
    status: false;
    type: variable;
})

A method that accepts a string and returns either the successfully resolved bytecode or an error. The string will never be empty (''), so resolution can skip checking the string's length.

Type Parameters

  • ProgramState

Type declaration

    • (identifier): {
          bytecode: Uint8Array;
          source: CompilationResultSuccess<ProgramState>;
          status: true;
          type: script;
      } | {
          bytecode: Uint8Array;
          status: true;
          type: opcode;
      } | {
          error: string;
          scriptId: string;
          status: false;
          type: script;
      } | {
          error: string;
          status: false;
          type: unknown;
      } | ResolutionDebug & ResolutionSignature & {
          bytecode: Uint8Array;
          status: true;
          type: variable;
      } | ResolutionDebug & {
          entityOwnership?: string;
          error: string;
          recoverable: boolean;
          status: false;
          type: variable;
      }
    • Parameters

      • identifier: string

      Returns {
          bytecode: Uint8Array;
          source: CompilationResultSuccess<ProgramState>;
          status: true;
          type: script;
      } | {
          bytecode: Uint8Array;
          status: true;
          type: opcode;
      } | {
          error: string;
          scriptId: string;
          status: false;
          type: script;
      } | {
          error: string;
          status: false;
          type: unknown;
      } | ResolutionDebug & ResolutionSignature & {
          bytecode: Uint8Array;
          status: true;
          type: variable;
      } | ResolutionDebug & {
          entityOwnership?: string;
          error: string;
          recoverable: boolean;
          status: false;
          type: variable;
      }

Generated using TypeDoc