angular/modules/benchmarks/src
Paul Gschwendtner 810b0a7e5c refactor: add explicit types for exports relying on inferred call return type (#61312)
As part of the Bazel toolchain migration we noticed that implicit types
generated by the TypeScript compiler sometimes end up referencing types
from other packages (i.e. cross-package imports).

These imports currently work just because the Bazel `ts_library` and
`ng_module` rules automatically inserted a `<amd-module
name="@angular/x" />` into `.d.ts` of packages. This helped TS figure
out how to import a given file. Notably this is custom logic that is not
occuring in vanilla TS or Angular compilations—so we will drop this
magic as part of the toolchain cleanup!

To improve code quality and keep the existing behavior working, we are
doing the following:

- adding a lint rule that reduces the risk of such imports breaking. The
  failure scenario without the rule is that API goldens show unexpected
  diffs, and types might be duplicated in a different package!

- keeping the `<amd-module` headers, but we manually insert them into
  the package entry-points. This should ensure we don't regress
  anywhere; while we also improved general safety around this above.

Long-term, isolated declarations or a lint rule from eslint-typescript
can make this even more robust.

PR Close #61312
2025-05-13 22:45:18 +00:00
..
change_detection refactor: add explicit types for exports relying on inferred call return type (#61312) 2025-05-13 22:45:18 +00:00
class_bindings build: fix type checking issues in test code (#60481) 2025-03-20 11:55:52 -07:00
defer refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
expanding_rows refactor(core): Migrate modules directory with the schematic. (#58160) 2024-10-14 14:58:58 +00:00
hydration refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
js-web-frameworks refactor(core): Migrate modules directory with the schematic. (#58160) 2024-10-14 14:58:58 +00:00
largeform refactor(core): Migrate modules directory with the schematic. (#58160) 2024-10-14 14:58:58 +00:00
largetable refactor(core): Migrate modules directory with the schematic. (#58160) 2024-10-14 14:58:58 +00:00
ng_template_outlet_context build: fix type checking issues in test code (#60481) 2025-03-20 11:55:52 -07:00
styling refactor(core): Migrate modules directory with the schematic. (#58160) 2024-10-14 14:58:58 +00:00
tree refactor(core): Migrate modules directory with the schematic. (#58160) 2024-10-14 14:58:58 +00:00
BUILD.bazel build: remove unused systemjs bootstrap benchmark scripts (#48521) 2022-12-19 19:50:45 +00:00
README.md build(bazel): //modules/benchmarks/src/largetable/render3:perf bazel protractor test (#24788) 2018-07-24 08:26:16 -07:00
util.ts refactor: remove unnecessary TSLint rule flags (#59365) 2025-01-07 16:06:21 +00:00

Benchmark Directory Layout

Bazel

Under bazel the rules for laying out test files are slightly different. Use largetable/render3 as an example.

Put the perf file in current subdirectory (ie largetable) such that the same perf file can be used for each of the sub-subdirectories. (ie largetable/* should all be testable with the same perf file largetable/largetable_perf.spec.ts). Under bazel, typescript protractor spec files must end with .spec.ts or .test.ts.