Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): set the proper type to `fileRepla…
Browse files Browse the repository at this point in the history
…cements`

Closes #11294
  • Loading branch information
alan-agius4 authored and alexeagle committed Sep 6, 2018
1 parent b4d135a commit fb0dd5f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
11 changes: 7 additions & 4 deletions packages/angular_devkit/build_angular/src/server/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit fb0dd5f

Please sign in to comment.