Skip to content

Commit

Permalink
export DecetorOptions and CustomDetector types
Browse files Browse the repository at this point in the history
  • Loading branch information
adrai committed Jan 25, 2022
1 parent 1d41f6d commit 340c1d6
Show file tree
Hide file tree
Showing 6 changed files with 1,255 additions and 2,160 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### 6.1.3

- export DecetorOptions and CustomDetector types


### 6.1.2

- fix lookup return types [245](https://github.com/i18next/i18next-browser-languageDetector/issues/245)
Expand Down
7 changes: 5 additions & 2 deletions i18nextBrowserLanguageDetector.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.i18nextBrowserLanguageDetector = factory());
}(this, (function () { 'use strict';
})(this, (function () { 'use strict';

function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
Expand All @@ -23,6 +23,9 @@
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
Object.defineProperty(Constructor, "prototype", {
writable: false
});
return Constructor;
}

Expand Down Expand Up @@ -438,4 +441,4 @@

return Browser;

})));
}));
2 changes: 1 addition & 1 deletion i18nextBrowserLanguageDetector.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface CookieOptions {
sameSite?: boolean | 'lax' | 'strict' | 'none';
}

interface DetectorOptions {
export interface DetectorOptions {
/**
* order and from where user language should be detected
*/
Expand Down Expand Up @@ -61,7 +61,7 @@ interface DetectorOptions {
htmlTag?: HTMLElement | null;
}

interface CustomDetector {
export interface CustomDetector {
name: string;
cacheUserLanguage?(lng: string, options: DetectorOptions): void;
lookup(options: DetectorOptions): string | string[] | undefined;
Expand Down
Loading

0 comments on commit 340c1d6

Please sign in to comment.