8000 SessionManager types elided · Issue #1057 · h3js/h3 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
SessionManager types elided #1057
Open
Open
@kaaax0815

Description

@kaaax0815

Environment

not relevant
h3 version: 1.15.3

Reproduction

just look at the build output

Describe the bug

this is the type of useSession

declare function useSession<T extends SessionDataT = SessionDataT>(event: H3Event | CompatEvent, config: SessionConfig): Promise<{
    readonly id: any;
    readonly data: T;
    update: (update: SessionUpdate<T>) => Promise</*elided*/ any>;
    clear: () => Promise</*elided*/ any>;
}>;

but it should be circular like this

h3/src/utils/session.ts

Lines 29 to 34 in 855efcb

export interface SessionManager<T extends SessionDataT = SessionDataT> {
readonly id: string | undefined;
readonly data: SessionData<T>;
update: (update: SessionUpdate<T>) => Promise<SessionManager<T>>;
clear: () => Promise<SessionManager<T>>;
}

Additional context

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtypesv1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0