Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Angular beta.12 #14147

Merged
merged 4 commits into from Apr 13, 2019

Conversation

Projects
None yet
5 participants
@filipesilva
Copy link
Member

filipesilva commented Apr 12, 2019

Blocked on an Angular version that supports TS 3.4.x, should be the upcoming 8.0.0-beta.12.

@@ -492,7 +492,7 @@ export abstract class SchematicCommand<
}

const pathOptions = o ? this.setPathOptions(o, workingDir) : {};
let input = Object.assign(pathOptions, args);
let input = { ...pathOptions, ...args };

This comment has been minimized.

Copy link
@filipesilva

filipesilva Apr 12, 2019

Author Member

Without this change, I got the following TS error:

packages/angular/cli/models/schematic-command.ts:500:5 - error TS2322: Type '{ '--'?: string[] | undefined; } | { '--'?: string[] | undefined; }' is not assignable to type '{ [name: string]: string
; } & Arguments'.
  Type '{ '--'?: string[] | undefined; }' is not assignable to type '{ [name: string]: string; } & Arguments'.
    Type '{ '--'?: string[] | undefined; }' is not assignable to type '{ [name: string]: string; }'.
      Property ''--'' is incompatible with index signature.
        Type 'string[] | undefined' is not assignable to type 'string'.
          Type 'undefined' is not assignable to type 'string'.

500     input = {

As far as I can tell, that's because Object.assign makes an intersection type ({ [name: string]: string; } & Arguments, which doesn't let you have the undefined) while {...something, ...somethingElse} does a sort of union type instead.

This comment has been minimized.

Copy link
@alexeagle

alexeagle Apr 13, 2019

Collaborator

thanks for explaining

@filipesilva filipesilva removed the blocked label Apr 13, 2019

@filipesilva filipesilva force-pushed the filipesilva:ts-3.4 branch from e579b13 to e491b47 Apr 13, 2019

@@ -125,7 +125,8 @@ export default async function () {
buildTarget['options']['experimentalImportFactories'] = true;
});
// Both Ivy and View Engine should support it.
await replaceLoadChildren(`() => import('./lazy/lazy.module').then(m => m.LazyModule)`);
// TODO: remove `as any` after https://github.com/angular/angular/pull/29832 is released.

This comment has been minimized.

Copy link
@filipesilva

@filipesilva filipesilva force-pushed the filipesilva:ts-3.4 branch from 28dd070 to 293d578 Apr 13, 2019

@filipesilva filipesilva changed the title build: update typescript to version 3.4.3 Update to Angular beta.12 Apr 13, 2019

@filipesilva filipesilva force-pushed the filipesilva:ts-3.4 branch from 293d578 to 0338c8d Apr 13, 2019

test: workaround Router typings
This workaround should be removed after angular/angular#29832 is released.

@filipesilva filipesilva force-pushed the filipesilva:ts-3.4 branch from 0338c8d to d2225c5 Apr 13, 2019

@@ -492,7 +492,7 @@ export abstract class SchematicCommand<
}

const pathOptions = o ? this.setPathOptions(o, workingDir) : {};
let input = Object.assign(pathOptions, args);
let input = { ...pathOptions, ...args };

This comment has been minimized.

Copy link
@alexeagle

alexeagle Apr 13, 2019

Collaborator

thanks for explaining

@alexeagle alexeagle merged commit e2a3895 into angular:master Apr 13, 2019

14 checks passed

ci/angular: merge status All checks passed!
ci/angular: size cli/new-production/test-project/main.js increased by 180 bytes.
ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: build-bazel Your tests passed on CircleCI!
Details
ci/circleci: e2e-cli Your tests passed on CircleCI!
Details
ci/circleci: e2e-cli-ivy Your tests passed on CircleCI!
Details
ci/circleci: e2e-cli-ng-snapshots Your tests passed on CircleCI!
Details
ci/circleci: install Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: test Your tests passed on CircleCI!
Details
ci/circleci: test-large Your tests passed on CircleCI!
Details
ci/circleci: validate Your tests passed on CircleCI!
Details
cla/google All necessary CLAs are signed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@alan-agius4
Copy link
Collaborator

alan-agius4 left a comment

Thanks for taking this on a Saturday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.