Skip to content

"session.rollingDuration" must be false when "session.rolling" is disabled #591

@dmitryweiner

Description

@dmitryweiner

I'm trying to disable session rolling by setting in config:

session: {
    absoluteDuration: 60 * 60 * 8,
    rollingDuration: 0,
    rolling: false,
},

But accidentally I'm getting compile error:

"session.rollingDuration" must be false when "session.rolling" is disabled

If I write as proposed:

session: {
    absoluteDuration: 60 * 60 * 8,
    rollingDuration: false,
    rolling: false,
},

I'm getting TS error:
TS2322: Type 'boolean' is not assignable to type 'number'. config.d.ts(171, 5): The expected type comes from property 'rollingDuration' which is declared here on type 'DeepPartial<SessionConfig>'

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs investigationThis needs to be investigated further before proceeding

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions