From 64ba1e6735c127dbf51901467a9a345cb0bcfb57 Mon Sep 17 00:00:00 2001 From: anRecky <45596261+Anrecky@users.noreply.github.com> Date: Sat, 20 Jul 2024 22:29:12 +0700 Subject: [PATCH] Allow null value for `mode` parameter in getParams function Explicitly updated the type of the `mode` parameter to `string | null` in the `getParams` function to support cases where `mode` might be `null`. This improves flexibility and handling of optional parameters. --- examples/example-umami/lib/get-params.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/example-umami/lib/get-params.ts b/examples/example-umami/lib/get-params.ts index b316201c..e43f2e90 100644 --- a/examples/example-umami/lib/get-params.ts +++ b/examples/example-umami/lib/get-params.ts @@ -3,7 +3,7 @@ import { DrupalJsonApiParams } from "drupal-jsonapi-params" // A helper function to build params for a resource type. export function getParams( name: string, - mode: string = null + mode: string | null = null ): DrupalJsonApiParams { const params = new DrupalJsonApiParams()