UNPKG

1.19 kBTypeScriptView Raw
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8import { BuilderContext } from '@angular-devkit/architect';
9import { json } from '@angular-devkit/core';
10import { Schema as BrowserBuilderSchema } from '../browser/schema';
11import { Schema as ServerBuilderSchema } from '../server/schema';
12export interface I18nOptions {
13 inlineLocales: Set<string>;
14 sourceLocale: string;
15 locales: Record<string, {
16 files: {
17 path: string;
18 integrity?: string;
19 format?: string;
20 }[];
21 translation?: Record<string, unknown>;
22 dataPath?: string;
23 baseHref?: string;
24 }>;
25 flatOutput?: boolean;
26 readonly shouldInline: boolean;
27 hasDefinedSourceLocale?: boolean;
28}
29export declare function createI18nOptions(metadata: json.JsonObject, inline?: boolean | string[]): I18nOptions;
30export declare function configureI18nBuild<T extends BrowserBuilderSchema | ServerBuilderSchema>(context: BuilderContext, options: T): Promise<{
31 buildOptions: T;
32 i18n: I18nOptions;
33}>;