Skip to content

Commit e4f56a5

Browse files
committed
refactor: update parameter types to Readonly for various validation functions
1 parent de3294e commit e4f56a5

File tree

31 files changed

+59
-31
lines changed

31 files changed

+59
-31
lines changed

src/app/[locale]/(doc-session)/documentation/js/functions/cnpjIsValid/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { LocaleParams } from "@/types/Params";
1010

1111
export default async function CnpjIsValid({
1212
params: { locale },
13-
}: LocaleParams) {
13+
}: Readonly<LocaleParams>) {
1414
setStaticParamsLocale(locale);
1515

1616
const t = await getScopedI18n("DocumentationJsFunctions");

src/app/[locale]/(doc-session)/documentation/js/functions/cpfIsValid/page.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ import DrawerComponent from "@/components/Drawer";
88
import { getScopedI18n } from "@/locales/server";
99
import { LocaleParams } from "@/types/Params";
1010

11-
export default async function CpfIsValid({ params: { locale } }: LocaleParams) {
11+
export default async function CpfIsValid({
12+
params: { locale },
13+
}: Readonly<LocaleParams>) {
1214
setStaticParamsLocale(locale);
1315

1416
const t = await getScopedI18n("DocumentationJsFunctions");

src/app/[locale]/(doc-session)/documentation/js/functions/getOnlyEmail/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { LocaleParams } from "@/types/Params";
1010

1111
export default async function GetOnlyEmail({
1212
params: { locale },
13-
}: LocaleParams) {
13+
}: Readonly<LocaleParams>) {
1414
setStaticParamsLocale(locale);
1515

1616
const t = await getScopedI18n("DocumentationJsFunctions");

src/app/[locale]/(doc-session)/documentation/js/functions/identifyFlagCard/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { LocaleParams } from "@/types/Params";
1010

1111
export default async function IdentifyFlagCard({
1212
params: { locale },
13-
}: LocaleParams) {
13+
}: Readonly<LocaleParams>) {
1414
setStaticParamsLocale(locale);
1515

1616
const t = await getScopedI18n("DocumentationJsFunctions");

src/app/[locale]/(doc-session)/documentation/js/functions/isAscii/page.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ import DrawerComponent from "@/components/Drawer";
88
import { getScopedI18n } from "@/locales/server";
99
import { LocaleParams } from "@/types/Params";
1010

11-
export default async function IsAscii({ params: { locale } }: LocaleParams) {
11+
export default async function IsAscii({
12+
params: { locale },
13+
}: Readonly<LocaleParams>) {
1214
setStaticParamsLocale(locale);
1315

1416
const t = await getScopedI18n("DocumentationJsFunctions");

src/app/[locale]/(doc-session)/documentation/js/functions/isBase64/page.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ import DrawerComponent from "@/components/Drawer";
88
import { getScopedI18n } from "@/locales/server";
99
import { LocaleParams } from "@/types/Params";
1010

11-
export default async function IsBase64({ params: { locale } }: LocaleParams) {
11+
export default async function IsBase64({
12+
params: { locale },
13+
}: Readonly<LocaleParams>) {
1214
setStaticParamsLocale(locale);
1315

1416
const t = await getScopedI18n("DocumentationJsFunctions");

src/app/[locale]/(doc-session)/documentation/js/functions/isCEP/page.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ import DrawerComponent from "@/components/Drawer";
88
import { getScopedI18n } from "@/locales/server";
99
import { LocaleParams } from "@/types/Params";
1010

11-
export default async function IsCEP({ params: { locale } }: LocaleParams) {
11+
export default async function IsCEP({
12+
params: { locale },
13+
}: Readonly<LocaleParams>) {
1214
setStaticParamsLocale(locale);
1315

1416
const t = await getScopedI18n("DocumentationJsFunctions");

src/app/[locale]/(doc-session)/documentation/js/functions/isCreditCardValid/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { LocaleParams } from "@/types/Params";
1010

1111
export default async function IsCreditCard({
1212
params: { locale },
13-
}: LocaleParams) {
13+
}: Readonly<LocaleParams>) {
1414
setStaticParamsLocale(locale);
1515

1616
const t = await getScopedI18n("DocumentationJsFunctions");

src/app/[locale]/(doc-session)/documentation/js/functions/isDate/page.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ import DrawerComponent from "@/components/Drawer";
88
import { getScopedI18n } from "@/locales/server";
99
import { LocaleParams } from "@/types/Params";
1010

11-
export default async function IsDate({ params: { locale } }: LocaleParams) {
11+
export default async function IsDate({
12+
params: { locale },
13+
}: Readonly<LocaleParams>) {
1214
setStaticParamsLocale(locale);
1315

1416
const t = await getScopedI18n("DocumentationJsFunctions");

src/app/[locale]/(doc-session)/documentation/js/functions/isDecimal/page.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ import DrawerComponent from "@/components/Drawer";
88
import { getScopedI18n } from "@/locales/server";
99
import { LocaleParams } from "@/types/Params";
1010

11-
export default async function IsDecimal({ params: { locale } }: LocaleParams) {
11+
export default async function IsDecimal({
12+
params: { locale },
13+
}: Readonly<LocaleParams>) {
1214
setStaticParamsLocale(locale);
1315

1416
const t = await getScopedI18n("DocumentationJsFunctions");

src/app/[locale]/(doc-session)/documentation/js/functions/isEmail/page.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ import DrawerComponent from "@/components/Drawer";
99
import { getScopedI18n } from "@/locales/server";
1010
import { LocaleParams } from "@/types/Params";
1111

12-
export default async function IsEmail({ params: { locale } }: LocaleParams) {
12+
export default async function IsEmail({
13+
params: { locale },
14+
}: Readonly<LocaleParams>) {
1315
setStaticParamsLocale(locale);
1416

1517
const t = await getScopedI18n("DocumentationJsFunctions");

src/app/[locale]/(doc-session)/documentation/js/functions/isEmpty/page.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ import DrawerComponent from "@/components/Drawer";
88
import { getScopedI18n } from "@/locales/server";
99
import { LocaleParams } from "@/types/Params";
1010

11-
export default async function IsEmpty({ params: { locale } }: LocaleParams) {
11+
export default async function IsEmpty({
12+
params: { locale },
13+
}: Readonly<LocaleParams>) {
1214
setStaticParamsLocale(locale);
1315

1416
const t = await getScopedI18n("DocumentationJsFunctions");

src/app/[locale]/(doc-session)/documentation/js/functions/isMACAddress/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { LocaleParams } from "@/types/Params";
1010

1111
export default async function IsMACAddress({
1212
params: { locale },
13-
}: LocaleParams) {
13+
}: Readonly<LocaleParams>) {
1414
setStaticParamsLocale(locale);
1515

1616
const t = await getScopedI18n("DocumentationJsFunctions");

src/app/[locale]/(doc-session)/documentation/js/functions/isMD5/page.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ import DrawerComponent from "@/components/Drawer";
88
import { getScopedI18n } from "@/locales/server";
99
import { LocaleParams } from "@/types/Params";
1010

11-
export default async function IsMD5({ params: { locale } }: LocaleParams) {
11+
export default async function IsMD5({
12+
params: { locale },
13+
}: Readonly<LocaleParams>) {
1214
setStaticParamsLocale(locale);
1315

1416
const t = await getScopedI18n("DocumentationJsFunctions");

src/app/[locale]/(doc-session)/documentation/js/functions/isNumber/page.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ import DrawerComponent from "@/components/Drawer";
88
import { getScopedI18n } from "@/locales/server";
99
import { LocaleParams } from "@/types/Params";
1010

11-
export default async function IsNumber({ params: { locale } }: LocaleParams) {
11+
export default async function IsNumber({
12+
params: { locale },
13+
}: Readonly<LocaleParams>) {
1214
setStaticParamsLocale(locale);
1315

1416
const t = await getScopedI18n("DocumentationJsFunctions");

src/app/[locale]/(doc-session)/documentation/js/functions/isPort/page.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ import DrawerComponent from "@/components/Drawer";
88
import { getScopedI18n } from "@/locales/server";
99
import { LocaleParams } from "@/types/Params";
1010

11-
export default async function IsPort({ params: { locale } }: LocaleParams) {
11+
export default async function IsPort({
12+
params: { locale },
13+
}: Readonly<LocaleParams>) {
1214
setStaticParamsLocale(locale);
1315

1416
const t = await getScopedI18n("DocumentationJsFunctions");

src/app/[locale]/(doc-session)/documentation/js/functions/isPostalCode/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { LocaleParams } from "@/types/Params";
1010

1111
export default async function IsPostalCode({
1212
params: { locale },
13-
}: LocaleParams) {
13+
}: Readonly<LocaleParams>) {
1414
setStaticParamsLocale(locale);
1515

1616
const t = await getScopedI18n("DocumentationJsFunctions");

src/app/[locale]/(doc-session)/documentation/js/functions/isTime/page.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ import DrawerComponent from "@/components/Drawer";
88
import { getScopedI18n } from "@/locales/server";
99
import { LocaleParams } from "@/types/Params";
1010

11-
export default async function IsTime({ params: { locale } }: LocaleParams) {
11+
export default async function IsTime({
12+
params: { locale },
13+
}: Readonly<LocaleParams>) {
1214
setStaticParamsLocale(locale);
1315

1416
const t = await getScopedI18n("DocumentationJsFunctions");

src/app/[locale]/(doc-session)/documentation/js/functions/isValidAudio/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { LocaleParams } from "@/types/Params";
1010

1111
export default async function IsValidAudio({
1212
params: { locale },
13-
}: LocaleParams) {
13+
}: Readonly<LocaleParams>) {
1414
setStaticParamsLocale(locale);
1515

1616
const t = await getScopedI18n("DocumentationJsFunctions");

src/app/[locale]/(doc-session)/documentation/js/functions/isValidPdf/page.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ import DrawerComponent from "@/components/Drawer";
88
import { getScopedI18n } from "@/locales/server";
99
import { LocaleParams } from "@/types/Params";
1010

11-
export default async function IsValidPdf({ params: { locale } }: LocaleParams) {
11+
export default async function IsValidPdf({
12+
params: { locale },
13+
}: Readonly<LocaleParams>) {
1214
setStaticParamsLocale(locale);
1315

1416
const t = await getScopedI18n("DocumentationJsFunctions");

src/app/[locale]/(doc-session)/documentation/js/functions/isValidTxt/page.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ import DrawerComponent from "@/components/Drawer";
88
import { getScopedI18n } from "@/locales/server";
99
import { LocaleParams } from "@/types/Params";
1010

11-
export default async function IsValidTxt({ params: { locale } }: LocaleParams) {
11+
export default async function IsValidTxt({
12+
params: { locale },
13+
}: Readonly<LocaleParams>) {
1214
setStaticParamsLocale(locale);
1315

1416
const t = await getScopedI18n("DocumentationJsFunctions");

src/app/[locale]/(doc-session)/documentation/js/functions/isValidVideo/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { LocaleParams } from "@/types/Params";
1010

1111
export default async function IsValidVideo({
1212
params: { locale },
13-
}: LocaleParams) {
13+
}: Readonly<LocaleParams>) {
1414
setStaticParamsLocale(locale);
1515

1616
const t = await getScopedI18n("DocumentationJsFunctions");

src/app/[locale]/(doc-session)/documentation/js/functions/validateBRPhoneNumber/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { LocaleParams } from "@/types/Params";
1010

1111
export default async function ValidateBRPhoneNumber({
1212
params: { locale },
13-
}: LocaleParams) {
13+
}: Readonly<LocaleParams>) {
1414
setStaticParamsLocale(locale);
1515

1616
const t = await getScopedI18n("DocumentationJsFunctions");

src/app/[locale]/(doc-session)/documentation/js/functions/validateEmail/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { LocaleParams } from "@/types/Params";
1010

1111
export default async function ValidateEmail({
1212
params: { locale },
13-
}: LocaleParams) {
13+
}: Readonly<LocaleParams>) {
1414
setStaticParamsLocale(locale);
1515

1616
const t = await getScopedI18n("DocumentationJsFunctions");

src/app/[locale]/(doc-session)/documentation/js/functions/validateName/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { LocaleParams } from "@/types/Params";
1010

1111
export default async function ValidateName({
1212
params: { locale },
13-
}: LocaleParams) {
13+
}: Readonly<LocaleParams>) {
1414
setStaticParamsLocale(locale);
1515

1616
const t = await getScopedI18n("DocumentationJsFunctions");

src/app/[locale]/(doc-session)/documentation/js/functions/validatePassportNumber/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { LocaleParams } from "@/types/Params";
1010

1111
export default async function ValidatePassportNumber({
1212
params: { locale },
13-
}: LocaleParams) {
13+
}: Readonly<LocaleParams>) {
1414
setStaticParamsLocale(locale);
1515

1616
const t = await getScopedI18n("DocumentationJsFunctions");

src/app/[locale]/(doc-session)/documentation/js/functions/validatePassword/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { LocaleParams } from "@/types/Params";
1010

1111
export default async function ValidatePassword({
1212
params: { locale },
13-
}: LocaleParams) {
13+
}: Readonly<LocaleParams>) {
1414
setStaticParamsLocale(locale);
1515

1616
const t = await getScopedI18n("DocumentationJsFunctions");

src/app/[locale]/(doc-session)/documentation/js/functions/validatePhoneNumber/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { LocaleParams } from "@/types/Params";
1010

1111
export default async function ValidatePhoneNumber({
1212
params: { locale },
13-
}: LocaleParams) {
13+
}: Readonly<LocaleParams>) {
1414
setStaticParamsLocale(locale);
1515

1616
const t = await getScopedI18n("DocumentationJsFunctions");

src/app/[locale]/(doc-session)/documentation/js/functions/validateSurname/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { LocaleParams } from "@/types/Params";
1010

1111
export default async function ValidateSurname({
1212
params: { locale },
13-
}: LocaleParams) {
13+
}: Readonly<LocaleParams>) {
1414
setStaticParamsLocale(locale);
1515

1616
const t = await getScopedI18n("DocumentationJsFunctions");

src/app/[locale]/(doc-session)/documentation/js/functions/validateTextarea/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { LocaleParams } from "@/types/Params";
1010

1111
export default async function ValidateTextarea({
1212
params: { locale },
13-
}: LocaleParams) {
13+
}: Readonly<LocaleParams>) {
1414
setStaticParamsLocale(locale);
1515

1616
const t = await getScopedI18n("DocumentationJsFunctions");

src/app/[locale]/(doc-session)/documentation/js/functions/validateUSPhoneNumber/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { LocaleParams } from "@/types/Params";
1010

1111
export default async function validateUSPhoneNumber({
1212
params: { locale },
13-
}: LocaleParams) {
13+
}: Readonly<LocaleParams>) {
1414
setStaticParamsLocale(locale);
1515

1616
const t = await getScopedI18n("DocumentationJsFunctions");

0 commit comments

Comments
 (0)