Socket
Socket
Sign inDemoInstall

@connectedcars/react-i18n

Package Overview
Dependencies
Maintainers
3
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@connectedcars/react-i18n - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

dist/types.d.ts

9

dist/components/Provider.d.ts

@@ -5,2 +5,3 @@ /// <reference types="react" />

import { Translations } from '../translate';
import { TranslateFunc, TranslatePluralFunc } from '../types';
export interface ProviderProps {

@@ -26,8 +27,8 @@ lang?: string;

getChildContext(): {
t: (text: string, data?: Object, context?: string) => string;
tn: (n: number, text: string, textPlural: string, data?: Object, context?: string) => string;
t: TranslateFunc;
tn: TranslatePluralFunc;
};
translate: (translations: Translations, lang?: string) => (text: string, data?: Object, context?: string) => string;
ntranslate: (translations: Translations, lang?: string) => (n: number, text: string, textPlural: string, data?: Object, context?: string) => string;
translate: (translations: Translations, lang?: string) => TranslateFunc;
ntranslate: (translations: Translations, lang?: string) => TranslatePluralFunc;
render(): React.ReactNode;
}
/// <reference types="react" />
import React, { ComponentType } from 'react';
import * as PropTypes from 'prop-types';
import { TranslateFunc, TranslatePluralFunc } from '../types';
export interface WithTranslateProps {
t(text: string, data?: Object, context?: string): string;
tn(n: number, text: string, textPlural: string, data?: Object, context?: string | null): string;
t: TranslateFunc;
tn: TranslatePluralFunc;
}
export declare function withTranslate<T>(WrappedComponent: ComponentType<T>): {
export declare function withTranslate<T>(WrappedComponent: ComponentType<T & WithTranslateProps>): {
new (props: T, context?: any): {
addExtraProps(props: any): any;
render(): React.ReactElement<T>;
render(): React.ReactElement<T & WithTranslateProps>;
setState<K extends never>(f: (prevState: Readonly<{}>, props: T) => Pick<{}, K>, callback?: () => any): void;

@@ -13,0 +14,0 @@ setState<K extends never>(state: Pick<{}, K>, callback?: () => any): void;

{
"name": "@connectedcars/react-i18n",
"author": "Connected Cars <oss@connectedcars.io>",
"version": "0.1.4",
"version": "0.1.5",
"description": "Translations!",

@@ -6,0 +6,0 @@ "license": "MIT",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc