fix(@angular-devkit/build-angular): set the proper type to fileReplacements

Closes #11294
This commit is contained in:
Alan Agius 2018-08-31 13:56:11 +02:00 committed by Alex Eagle
parent 65ede1fd6e
commit e16c8bbe87
3 changed files with 10 additions and 6 deletions

View File

@ -49,7 +49,7 @@ export interface BrowserBuilderSchema {
/**
* Replace files with other files in the build.
*/
fileReplacements: FileReplacements[];
fileReplacements: FileReplacement[];
/**
* Path where output will be placed.

View File

@ -85,7 +85,8 @@ export class ExtractI18nBuilder implements Builder<ExtractI18nBuilderOptions> {
// Extracting i18n uses the browser target webpack config with some specific options.
const webpackConfig = this.buildWebpackConfig(root, projectRoot, {
...browserOptions,
// todo: remove this casting when 'CurrentFileReplacement' is changed to 'FileReplacement'
...(browserOptions as NormalizedBrowserBuilderSchema),
optimization: false,
i18nLocale: options.i18nLocale,
i18nFormat: options.i18nFormat,

View File

@ -5,6 +5,9 @@
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { FileReplacement } from '../browser/schema';
export interface BuildWebpackServerSchema {
/**
* The name of the TypeScript configuration file.
@ -80,7 +83,7 @@ export interface BuildWebpackServerSchema {
/**
* Replace files with other files in the build.
*/
fileReplacements: FileReplacements[];
fileReplacements: FileReplacement[];
/**
* Define the output filename cache-busting hashing mode.
*/
@ -125,9 +128,9 @@ export interface BuildWebpackServerSchema {
* Run build when files change.
*/
watch?: boolean;
/**
* Enable and define the file watching poll time period in milliseconds.
*/
/**
* Enable and define the file watching poll time period in milliseconds.
*/
poll?: number;
}