angular-docs-cn/tools
cexbrayat 95830ee584 feat(common): stricter types for SlicePipe (#30156)
Adds overloads to the `transform` methods of `SlicePipe`,
to have better types than `any` for `value` and `any` as a return.
With this commit, using `slice` in an `ngFor` still allow to type-check the content of the `ngFor`
with `fullTemplateTypeCheck` enabled in Ivy:

    <div *ngFor="let user of users | slice:0:2">{{ user.typo }}</div>
                                                        |
                                                        `typo` does not exist on type `UserModel`

whereas it is currently not catched (as the return of `slice` is `any`) neither in VE nor in Ivy.

BREAKING CHANGE
`SlicePipe` now only accepts an array of values, a string, null or undefined.
This was already the case in practice, and it still throws at runtime if another type is given.
But it is now a compilation error to try to call it with an unsupported type.

PR Close #30156
2019-05-17 14:21:36 -07:00
..
brotli-cli build: Remove cc_binary dependency on brotli (#29912) 2019-04-17 17:20:16 -07:00
build build: remove obsolete files (#26471) 2018-10-23 08:57:41 -07:00
cjs-jasmine refactor(ivy): run the compiler compliance tests against ngtsc (#24862) 2018-07-20 11:48:36 -07:00
gulp-tasks Revert "feat(ivy): use i18n locale data to determine the plural form of ICU expressions (#29249)" (#29918) 2019-04-15 16:55:51 -07:00
material-ci fix(ivy): ensure parent/sub-class components evaluate styling correctly (#29602) 2019-04-05 16:49:52 -07:00
ngcontainer build: use bazel version from node modules (#26691) 2018-10-30 16:19:13 -04:00
npm style: add file header (#28871) 2019-02-28 12:06:36 -08:00
public_api_guard feat(common): stricter types for SlicePipe (#30156) 2019-05-17 14:21:36 -07:00
rxjs build: rules_nodejs 0.26.0 & use @npm instead of @ngdeps now that downstream angular build uses angular bundles (#28871) 2019-02-28 12:06:36 -08:00
size-tracking build: update rules_nodejs and clean up bazel warnings (#30370) 2019-05-14 10:08:45 -07:00
source-map-test build: update npm dependencies (#19328) 2017-09-22 13:20:52 -07:00
symbol-extractor build: unable to accept new symbol-extractor golden on windows (#30127) 2019-04-26 16:35:51 -07:00
testing build(bazel): update to nodejs rules 0.27.9 (#29647) 2019-04-02 10:27:14 -07:00
ts-api-guardian refactor(ivy): migrate ɵɵ prefix back to Δ (#30362) 2019-05-14 16:52:15 -07:00
tslint build: remove unused rollup.config.js files (#28646) 2019-02-14 19:28:08 +00:00
validate-commit-message ci: remove validate-commit-message tests from travis (#27386) 2018-12-05 20:55:32 -08:00
yarn build: upgrade yarn to 1.3.2 (#21406) 2018-01-10 12:32:26 -08:00
BUILD.bazel feat(bazel): use rbe_autoconfig() and new container. (#29336) 2019-05-09 14:58:34 -07:00
bazel_stamp_vars.js build: add pre-release check that validates the version name (#29551) 2019-03-27 12:26:13 -07:00
check-environment.js build: update to Node 10 (#25822) 2018-09-06 14:58:30 -07:00
defaults.bzl fix(bazel): use //:tsconfig.json as the default for ng_module (#29670) 2019-04-02 15:57:11 -07:00
jasmine-seed-generator.js test: run unit tests in random order (#19904) 2018-07-06 13:48:02 -07:00
jsconfig.json chore(vscode): add jsconfig.json and remove .settings dir 2015-10-29 13:53:21 +00:00
postinstall-patches.js build(bazel): update to latest stable chromium 74 on osx and linux for karma under bazel (#30502) 2019-05-16 14:38:14 -07:00
rebase-pr.js ci: rebase PRs on target branch (#29215) 2019-03-12 11:34:58 -07:00
tsconfig-test.json build(bazel): use fine-grained npm deps (#26111) (#26488) 2018-10-19 20:59:29 -07:00
tsconfig.json build: ts-api-guardian tsconfig warning with bazel (#27583) 2018-12-13 11:01:48 -08:00
types.d.ts build(bazel): use bazel managed node_modules for downstream angular from source build support (#24663) 2018-07-26 17:02:21 -07:00
utils.inc feat(bundle): add script to push bundles to code.angularjs.org 2015-04-14 14:50:53 -07:00