Skip to content

Commit 4d4a007

Browse files
authored
Add exports for i18n types & functions (#2028)
1 parent 2149e89 commit 4d4a007

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/i18n/prepare-keysets/utils.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function umdTemplate(content: string, globalVar: string) {
3636
`.trim();
3737
}
3838

39-
async function listKeysetDirNames(keysetsDir: string) {
39+
export async function listKeysetDirNames(keysetsDir: string) {
4040
const result: string[] = [];
4141
const directories = await fs.promises.readdir(keysetsDir, {withFileTypes: true});
4242

@@ -49,7 +49,7 @@ async function listKeysetDirNames(keysetsDir: string) {
4949
return result;
5050
}
5151

52-
async function loadJson(dirname: string, filename: string) {
52+
export async function loadJson(dirname: string, filename: string) {
5353
const fullname = path.resolve(dirname, filename);
5454
const content = await fs.promises.readFile(fullname, {
5555
encoding: 'utf-8',
@@ -61,7 +61,7 @@ async function loadJson(dirname: string, filename: string) {
6161
}
6262
}
6363

64-
type KeysetsWithLangs = {
64+
export type KeysetsWithLangs = {
6565
[lang in string]: {
6666
[name in string]: {
6767
content: Record<string, unknown>;
@@ -97,7 +97,7 @@ export async function getKeysets(keysetsDir: string) {
9797
return keysets;
9898
}
9999

100-
type KeysetData = {
100+
export type KeysetData = {
101101
filename: string;
102102
keyset: Record<string, Record<string, unknown>>;
103103
};

0 commit comments

Comments
 (0)