Fixes including, but not limited to:
- `visibleLines` values
- all codeblocks normalized to 2 spaces indentation
- lesson 14-http sEverely de-indented
- descriptions and explanations were rewritten to reflect the changes from @Input to input and from ngFor to @for
- missing step added in lesson 11-details-page
- rewritten confusing instructions for adding code that was already added in previous steps
PR Close#62457
The `generateUniqueIdentifier` helper relies on the internal `identifiers` property of a `ts.SourceFile`.
As this is not a public-facing API, it is not included in the externs provided to Closure Compiler.
Consequently, it is susceptible to being renamed during advanced optimizations, which would lead to runtime failures.
To prevent this, the property is now accessed via a string literal (`sf['identifiers']`). This change ensures that
the property name is preserved through the compilation process. An explanatory comment has been added to clarify the
necessity of this approach for future reference.
PR Close#62517
Currently when a diagnostic happens in a template, we always say "Error occurs in ...", however we have other types of diagnostics as well.
PR Close#62479
The mock file system currently relies on some NodeJS logic. This blocks
the convenient use of the mock file system in the browser. The file
system is useful for creating tests to verify e.g. that our transforms
can work in the browser.
PR Close#62493
The static fields may be part of advanced compilations where the
receiver would change as part of the static field collapsing
optimization.
The optimization requires us to use the explicit class name, over
`this` that would change to e.g. `globalThis`.
PR Close#62493
The commit introduce the distinction between
- class like decorators (like Component, Interface, NgModule. They are formatted like classes/interfaces, with each attribute being documents.
- function like decorators (Attribute, Host, Optional...)
PR Close#60411
Currently when Tsurge runs in g3, it creates a bare bones Angular
compiler plugin. The tsconfigs from compilation units may set options
like "useHostForImportGeneration", but the Ngtsc logic doesn't enable
because the `fileNameToModuleName` method is not defined on the host.
This can break reference emission for Tsurge analyzers/programs and
result in subtle differences to real `ng_module` compilations. This
commit fixes this by making the method available in 1P Tsurge.
Notably, reference emission can occur during analysis— so even if
migrations aren't "emitting TS -> JS" output.
PR Close#62447
Following some infra changes, DTS files are now splitted over several files, which aren't referenced in the `package.json` but are directly imported in the root dts.
We chose to not use ATA here because it only pulls the latest version from a CDN whereas we prefer to use the local definitions we have in the `node_modules` of the tutorial.
fixes#62374
PR Close#62424
When executing the compiler-cli in the browser, or some parts of it—
modules like `url` are stubbed out with `{}`. This commit accounts for
this.
PR Close#62431
Use the packaged versions of the packages instead of the local ts_project dependencies to prevent multiple versions of the deps to enter test bundles
PR Close#62413
Use the packaged versions of the packages instead of the local ts_project dependencies to prevent multiple versions of the deps to enter test bundles
PR Close#62413
Since we know that DOM properties won't go to an inputs, we can move the remapping logic to the compiler, saving us some processing on the client.
PR Close#62421