Black Trigram (흑괘) - Korean Martial Arts Combat Simulator API - v0.5.30
    Preparing search index...

    Interface Result<T, E>

    Generic result wrapper for operations that may succeed or fail.

    const result: Result<PlayerState> = {
    success: true,
    data: playerState
    };
    interface Result<T, E = Error> {
        data?: T;
        error?: E;
        message?: string;
        success: boolean;
    }

    Type Parameters

    • T

      Type of successful result data

    • E = Error

      Type of error, defaults to Error

    Index

    Properties

    data?: T

    Result data if successful

    error?: E

    Error if operation failed

    message?: string

    Optional message

    success: boolean

    Whether operation succeeded