@lingui/react
Advanced tools
Comparing version 4.0.0 to 4.1.0
@@ -11,5 +11,9 @@ import React, { ComponentType, FunctionComponent } from 'react'; | ||
}; | ||
type MaximumOneOf<T, K extends keyof T = keyof T> = K extends keyof T ? { | ||
[P in K]?: T[K]; | ||
} & Partial<Record<Exclude<keyof T, K>, never>> : never; | ||
type TransRenderCallbackOrComponent = { | ||
component?: undefined; | ||
render?: (props: TransRenderProps) => React.ReactElement<any, any> | null; | ||
} | { | ||
component?: React.ComponentType<TransRenderProps> | null; | ||
render?: undefined; | ||
}; | ||
type TransProps = { | ||
@@ -24,6 +28,3 @@ id: string; | ||
children?: React.ReactNode; | ||
} & MaximumOneOf<{ | ||
component?: React.ComponentType<TransRenderProps>; | ||
render?: (props: TransRenderProps) => React.ReactElement<any, any> | null; | ||
}>; | ||
} & TransRenderCallbackOrComponent; | ||
declare function Trans(props: TransProps): React.ReactElement<any, any> | null; | ||
@@ -42,2 +43,2 @@ | ||
export { I18nContext, I18nProvider, I18nProviderProps, LinguiContext, Trans, TransProps, TransRenderProps, useLingui }; | ||
export { I18nContext, I18nProvider, I18nProviderProps, LinguiContext, Trans, TransProps, TransRenderCallbackOrComponent, TransRenderProps, useLingui }; |
{ | ||
"name": "@lingui/react", | ||
"version": "4.0.0", | ||
"version": "4.1.0", | ||
"sideEffects": false, | ||
@@ -61,3 +61,3 @@ "description": "React components for translations", | ||
"@babel/runtime": "^7.20.13", | ||
"@lingui/core": "4.0.0" | ||
"@lingui/core": "4.1.0" | ||
}, | ||
@@ -74,3 +74,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "998996381f5e5a458c2eccf650f949d8c5d8ac89" | ||
"gitHead": "471813c5de9ade3acccf647e18922b570a804577" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21889
547
+ Added@lingui/core@4.1.0(transitive)
+ Added@lingui/message-utils@4.1.0(transitive)
- Removed@lingui/core@4.0.0(transitive)
- Removed@lingui/message-utils@4.0.0(transitive)
Updated@lingui/core@4.1.0