angular-docs-cn/packages/core/schematics/migrations/static-queries
Paul Gschwendtner 1102b02406 refactor(core): static-query schematic should handle function callbacks (#29663)
Currently the static-query schematic is not able to properly handle
call expressions that pass function declarations that access a given
query. e.g.

```ts
ngOnInit() {
  this._callFunction(() => this.myQuery.doSomething());
}

_callFunction(cb: any) { cb(); }
```

In that case the passed function is executed synchronously in
the "ngOnInit" lifecycle and therefore the query needs to be
detected as "static".

We can fix this by keeping track of the current function context
and using it to resolve identifiers to the passed arguments.

PR Close #29663
2019-04-08 17:21:24 -07:00
..
angular refactor(core): static-query schematic should handle function callbacks (#29663) 2019-04-08 17:21:24 -07:00
google3 refactor(core): move schematic typescript logic to utility package (#29608) 2019-04-02 15:47:32 -07:00
BUILD.bazel refactor(core): add tslint rule entry-point for static-query migration (#29258) 2019-03-14 16:02:37 -04:00
index.ts refactor(core): move schematic typescript logic to utility package (#29608) 2019-04-02 15:47:32 -07:00
transform.ts refactor(core): stronger type for resolved angular decorators (#29608) 2019-04-02 15:47:32 -07:00