Skip to content

Commit

Permalink
drop internal symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsorban44 committed Jan 30, 2024
1 parent 0ce8252 commit 3ce5b2a
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions packages/next/src/client/components/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ import { clientHookInServerComponentError } from './client-hook-in-server-compon
import { getSegmentValue } from './router-reducer/reducers/get-segment-value'
import { PAGE_SEGMENT_KEY, DEFAULT_SEGMENT_KEY } from '../../shared/lib/segment'

const INTERNAL_URLSEARCHPARAMS_INSTANCE = Symbol(
'internal for urlsearchparams readonly'
)

/** @internal */
class ReadonlyURLSearchParamsError extends Error {
constructor() {
Expand All @@ -28,17 +24,6 @@ class ReadonlyURLSearchParamsError extends Error {
}

export class ReadonlyURLSearchParams extends URLSearchParams {
[INTERNAL_URLSEARCHPARAMS_INSTANCE]: URLSearchParams

constructor(init: URLSearchParams) {
super(init)

this[INTERNAL_URLSEARCHPARAMS_INSTANCE] = init
}
[Symbol.iterator]() {
return this[INTERNAL_URLSEARCHPARAMS_INSTANCE][Symbol.iterator]()
}

/** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */
append() {
throw new ReadonlyURLSearchParamsError()
Expand Down

0 comments on commit 3ce5b2a

Please sign in to comment.