@mateothegreat/svelte5-router - 2.15.3
    Preparing search index...

    Class Query

    Query string operations.

    Index

    Constructors

    Properties

    original?: string
    params: Record<string, ReturnParam> = {}

    Methods

    • Delete a value from the query string parameters.

      Parameters

      • key: string

      Returns void

    • Get a value from the query string parameters and optionally provide a default value if the key is not found.

      Type Parameters

      • T

      Parameters

      • key: string

        The key to get the value from.

      • OptionaldefaultValue: T

        The default value to return if the key is not found.

      Returns T

    • Set a value in the query string parameters.

      Parameters

      • key: string
      • value: string

      Returns void

    • Convert the query string parameters to a JSON object given we may have parameter values that are not json serializable out of the box.

      Parameters

      • OptionalpreserveOriginal: boolean

      Returns { [k: string]: string }