declare namespace moonbit_d_exports { export { Bool, Byte, Bytes, Char, Double, FixedArray, Float, Int, Int64, Result, String, UInt, UInt64, UnboxedOption, UnboxedOptionAsInt, Unit, __brand }; } /** * A non-public unique symbol used to mark the brand of a type. * And avoid user to construct values of the type. */ declare const __brand: unique symbol; type Unit = undefined; type Bool = boolean; /** * A signed integer in 32-bit two's complement format. */ type Int = number; /** * An unsigned integer in 32-bit two's complement format. */ type UInt = number; /** * A character in the range 0-0x10FFFF. */ type Char = number; /** * A byte in the range 0-255. */ type Byte = number; /** * Single-precision floating point number. */ type Float = number; type Double = number; /** * Backed by `bigint`, but not equal to the backing value: * runtime operations interpret it with signed 64-bit wraparound semantics. * Use `BigInt.asIntN(64, x)` to get the numerically equivalent `bigint`. */ type Int64 = bigint & { [__brand]: "Int64"; }; /** * Backed directly by `bigint`. * Valid `UInt64` values are in the unsigned 64-bit range `[0, 2^64)`. */ type UInt64 = bigint & { [__brand]: "UInt64"; }; type String = string; type Bytes = Uint8Array; type FixedArray = T[]; type UnboxedOption = /* Some */ T | /* None */ undefined; type UnboxedOptionAsInt = /* Some */ T | /* None */ -1; type Result = /* Ok */ { $tag: 1; _0: T; } | /* Err */ { $tag: 0; _0: E; }; //#endregion //#region ../../_build/js/release/build/mizchi/luna/js/api_resource_lite/api_resource_lite.d.ts export declare function stateError(state: any): any; export declare function stateValue(state: any): any; export declare function stateIsFailure(state: any): Bool; export declare function stateIsSuccess(state: any): Bool; export declare function stateIsPending(state: any): Bool; export declare function resourceError(resource: any): any; export declare function resourceValue(resource: any): any; export declare function resourceIsFailure(resource: any): Bool; export declare function resourceIsSuccess(resource: any): Bool; export declare function resourceIsPending(resource: any): Bool; export declare function resourceRefetch(resource: any): Unit; export declare function resourcePeek(resource: any): any; export declare function resourceGet(resource: any): any; //#endregion //#region src/resource.d.ts export type PendingState = { $tag: 0; }; export type SuccessState = { $tag: 1; _0: T; }; export type FailureState = { $tag: 2; _0: string; }; export type AsyncState = PendingState | SuccessState | FailureState; export type ResourceFetcher = (resolve: (value: T) => void, reject: (error: string) => void) => void; export interface Resource { _state?: AsyncState; _fetcher?: ResourceFetcher; } export declare function createResource(fetcher: ResourceFetcher): Resource; export declare function createDeferred(): readonly [any, any, any]; //#endregion