diff --git a/src/index.d.ts b/src/index.d.ts index d87d4ce81..256014674 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -33,7 +33,7 @@ export interface TransProps extends React.HTMLProps, Partial { children?: React.ReactNode; - components?: React.ReactNode[]; + components?: readonly React.ReactNode[]; count?: number; defaults?: string; i18n?: i18n; diff --git a/test/typescript/Trans.test.tsx b/test/typescript/Trans.test.tsx index 76bf82b64..6b25f1065 100644 --- a/test/typescript/Trans.test.tsx +++ b/test/typescript/Trans.test.tsx @@ -17,6 +17,11 @@ function components() { return ]}>Foo; } +function constComponents() { + const constArray = [
] as const; + return Foo; +} + function count() { return Foo; }