Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/i18next

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/i18next - npm Package Compare versions

Comparing version 2.3.38 to 8.4.0

66

i18next/index.d.ts

@@ -1,2 +0,2 @@

// Type definitions for i18next v2.3.5
// Type definitions for i18next v8.4.2
// Project: http://i18next.com

@@ -8,3 +8,2 @@ // Definitions by: Michael Ledin <https://github.com/mxl>, Budi Irawan <https://github.com/deerawan>

declare namespace i18n {

@@ -29,3 +28,8 @@ interface ResourceStore {

type FormatFunction = (value: any, format: string, lng: string) => string;
interface InterpolationOptions {
format?: FormatFunction;
formatSeparator?: string;
escape?: (str: string) => string;
escapeValue?: boolean;

@@ -104,36 +108,24 @@ prefix?: string;

type TranslationFunction = (key: string, options?: TranslationOptions) => string;
type LoadCallback = (error: any, t: TranslationFunction) => void;
interface I18n {
//constructor(options?: Options, callback?: (err: any, t: TranslationFunction) => void);
init(options?: Options&ReactOptions, callback?: (err: any, t: TranslationFunction) => void): I18n;
loadResources(callback?: (err: any) => void): void;
// api
init(options?: Options & ReactOptions, callback?: LoadCallback): I18n;
use(module: any): I18n;
t(key: string, options?: TranslationOptions): string | any | any[];
exists(key: string, options?: TranslationOptions): boolean;
getFixedT(lng?: string, ns?: string | string[]): TranslationFunction;
changeLanguage(lng: string, callback?: LoadCallback): void;
language: string;
languages: string[];
use(module: any): I18n;
changeLanguage(lng: string, callback?: (err: any, t: TranslationFunction) => void): void;
getFixedT(lng?: string, ns?: string | string[]): TranslationFunction;
t(key: string, options?: TranslationOptions): string | any | Array<any>;
exists(key: string, options?: TranslationOptions): boolean;
loadNamespaces(ns: string[], callback?: LoadCallback): void;
loadLanguages(lngs: string[], callback?: LoadCallback): void;
reloadResources(lng?: string[], ns?: string[]): void;
setDefaultNamespace(ns: string): void;
loadNamespaces(ns: string[], callback?: () => void): void;
loadLanguages(lngs: string[], callback?: () => void): void;
dir(lng?: string): string;
createInstance(options?: Options, callback?: (err: any, t: TranslationFunction) => void): I18n;
cloneInstance(options?: Options, callback?: (err: any, t: TranslationFunction) => void): I18n;
format: FormatFunction; // introduced in v8.4.0;
// instance creation
createInstance(options?: Options, callback?: LoadCallback): I18n;
cloneInstance(options?: Options, callback?: LoadCallback): I18n;
// events
on(event: string, listener: () => void): void;

@@ -147,4 +139,16 @@ on(initialized: 'initialized', listener: (options: i18n.Options) => void): void;

on(languageChanged: 'languageChanged', listener: (lng: string) => void): void;
off(event: string, listener: () => void): void;
// resource handling
getResource(lng: string, ns: string, key: string, options?: {
keySeparator?: string,
}): ResourceStore;
addResource(lng: string, ns: string, key: string, value: string, options?: {
keySeparator?: string,
silent?: boolean,
}): void;
addResources(lng: string, ns: string, resources: ResourceStore): void;
addResourceBundle(lng: string, ns: string, resources: ResourceStore, deep: boolean, overwrite: boolean): void;
hasResourceBundle(lng: string, ns: string): boolean;
getResourceBundle(lng: string, ns: string): ResourceStore;
removeResourceBundle(lng: string, ns: string): void;

@@ -151,0 +155,0 @@ options: Options;

{
"name": "@types/i18next",
"version": "2.3.38",
"version": "8.4.0",
"description": "TypeScript definitions for i18next",

@@ -24,4 +24,4 @@ "license": "MIT",

"peerDependencies": {},
"typesPublisherContentHash": "d6a0d9931e1c355cd4bcb268d49cb662260636725440fe13e63af5e73b6a242d",
"typesPublisherContentHash": "23c5641f8af5ac2e1b5055d674f33e097222904943f0136b63356a76100c04e3",
"typeScriptVersion": "2.0"
}

@@ -11,3 +11,3 @@ # Installation

Additional Details
* Last updated: Mon, 01 May 2017 20:47:58 GMT
* Last updated: Fri, 30 Jun 2017 21:28:45 GMT
* Dependencies: none

@@ -14,0 +14,0 @@ * Global values: none

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