Skip to content

Commit

Permalink
fix(@angular/cli): fix issues in google3
Browse files Browse the repository at this point in the history
  • Loading branch information
qiyigg authored and Keen Yee Liau committed Sep 13, 2018
1 parent 437cd62 commit e36a259
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 2 additions & 0 deletions packages/angular/cli/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ ts_library(
"//packages/angular_devkit/schematics:tools",
"@rxjs",
"@rxjs//operators",
# @typings: es2017.object
# @typings: inquirer
# @typings: node
# @typings: semver
],
Expand Down
9 changes: 6 additions & 3 deletions packages/angular_devkit/core/src/json/schema/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,8 @@ export class CoreSchemaRegistry implements SchemaRegistry {

let result = of(data);
if (validationOptions.applyPreTransforms) {
result = result.pipe(
// tslint:disable-next-line:no-any https://github.com/ReactiveX/rxjs/issues/3989
result = (result as any).pipe(
...[...this._pre].map(visitor => concatMap((data: JsonValue) => {
return visitJson(data, visitor, schema, this._resolver, validate);
})),
Expand Down Expand Up @@ -392,7 +393,8 @@ export class CoreSchemaRegistry implements SchemaRegistry {
let result = of(data);

if (validationOptions.applyPostTransforms) {
result = result.pipe(
// tslint:disable-next-line:no-any https://github.com/ReactiveX/rxjs/issues/3989
result = (result as any).pipe(
...[...this._post].map(visitor => concatMap((data: JsonValue) => {
return visitJson(data, visitor, schema, this._resolver, validate);
})),
Expand Down Expand Up @@ -686,7 +688,8 @@ export class CoreSchemaRegistry implements SchemaRegistry {
data: T,
smartDefaults: Map<string, JsonObject>,
): Observable<T> {
return of(data).pipe(
// tslint:disable-next-line:no-any https://github.com/ReactiveX/rxjs/issues/3989
return (of(data) as any).pipe(
...[...smartDefaults.entries()].map(([pointer, schema]) => {
return concatMap<T, T>(data => {
const fragments = JSON.parse(pointer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ export class FallbackEngineHost implements EngineHost<{}, {}> {
options: OptionT,
context?: FallbackContext,
): Observable<ResultT> {
return (observableOf(options)
// tslint:disable-next-line:no-any https://github.com/ReactiveX/rxjs/issues/3989
return ((observableOf(options) as any)
.pipe(...this._hosts
.map(host => mergeMap(opt => host.transformOptions(schematic, opt, context))),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,8 @@ export abstract class FileSystemEngineHostBase implements
options: OptionT,
context?: FileSystemSchematicContext,
): Observable<ResultT> {
return (observableOf(options)
// tslint:disable-next-line:no-any https://github.com/ReactiveX/rxjs/issues/3989
return ((observableOf(options) as any)
.pipe(
...this._transforms.map(tFn => mergeMap(opt => {
const newOptions = tFn(schematic, opt, context);
Expand Down

0 comments on commit e36a259

Please sign in to comment.