@lingui/react
Advanced tools
Comparing version 3.0.1-0 to 3.0.1
@@ -266,2 +266,4 @@ 'use strict'; | ||
if (render === null || component === null) { | ||
// Although `string` is a valid react element, types only allow `Element` | ||
// Upstream issue: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/20544 | ||
return translation; | ||
@@ -268,0 +270,0 @@ } |
@@ -8,3 +8,2 @@ import React from "react"; | ||
}; | ||
export declare type TransRenderType = React.ComponentType<TransRenderProps> | React.ElementType<TransRenderProps>; | ||
export declare type TransProps = { | ||
@@ -18,6 +17,6 @@ id: string; | ||
formats?: Object; | ||
component?: TransRenderType; | ||
render?: (opts: TransRenderProps) => TransRenderType; | ||
component?: React.ComponentType<TransRenderProps>; | ||
render?: (props: TransRenderProps) => React.ReactElement<any, any> | null; | ||
}; | ||
export declare function Trans(props: TransProps): string | any[] | React.ComponentClass<TransRenderProps, any> | React.FunctionComponent<TransRenderProps> | JSX.Element; | ||
export declare function Trans(props: TransProps): React.ReactElement<any, any> | null; | ||
export declare namespace Trans { | ||
@@ -24,0 +23,0 @@ var defaultProps: { |
{ | ||
"name": "@lingui/react", | ||
"version": "3.0.1-0", | ||
"version": "3.0.1", | ||
"description": "React components for translations", | ||
@@ -43,3 +43,3 @@ "main": "index.js", | ||
"@babel/runtime": "^7.11.2", | ||
"@lingui/core": "3.0.1-0" | ||
"@lingui/core": "3.0.1" | ||
}, | ||
@@ -46,0 +46,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
26133
343
2
+ Added@lingui/core@3.0.1(transitive)
- Removed@lingui/core@3.0.1-0(transitive)
Updated@lingui/core@3.0.1