-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
feat(common): rename underlying NgFor
class and add a type parameter
#14104
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Should this be 2 separate commits ? |
Sure. Do you want three commits, one for adding |
chuckjaz
force-pushed
the
ngfor-type-parameter
branch
3 times, most recently
from
January 25, 2017 21:50
e40e6f6
to
f4bc94c
Compare
chuckjaz
added a commit
to chuckjaz/angular
that referenced
this pull request
Jan 25, 2017
chuckjaz
added a commit
to chuckjaz/angular
that referenced
this pull request
Jan 25, 2017
chuckjaz
added a commit
to chuckjaz/angular
that referenced
this pull request
Jan 25, 2017
…ngular#14104) DEPRECATION: - `NgFor` is now deprecated. Use `NgForOf<T>` instead. - `TrackByFn` is not deprecated. Use `TrackByFunciton<T>` instead. Migration: - Most code is unaffected by this change as references to `NgFor` are generated by the AOT compiler. No template changes required. - Replace references to `NgFor` to `NgForOf<any>`. - Replace references to `TrackByFn` to `TrackByFunction<any>`. Part of angular#12398
chuckjaz
force-pushed
the
ngfor-type-parameter
branch
from
January 25, 2017 21:55
f4bc94c
to
a9cdd08
Compare
chuckjaz
added a commit
to chuckjaz/angular
that referenced
this pull request
Jan 25, 2017
chuckjaz
added a commit
to chuckjaz/angular
that referenced
this pull request
Jan 25, 2017
…ngular#14104) DEPRECATION: - `NgFor` is now deprecated. Use `NgForOf<T>` instead. - `TrackByFn` is not deprecated. Use `TrackByFunciton<T>` instead. Migration: - Most code is unaffected by this change as references to `NgFor` are generated by the AOT compiler. No template changes required. - Replace references to `NgFor` to `NgForOf<any>`. - Replace references to `TrackByFn` to `TrackByFunction<any>`. Part of angular#12398
chuckjaz
force-pushed
the
ngfor-type-parameter
branch
from
January 25, 2017 22:50
a9cdd08
to
4291efe
Compare
chuckjaz
added a commit
to chuckjaz/angular
that referenced
this pull request
Jan 25, 2017
…ngular#14104) DEPRECATION: - `NgFor` is now deprecated. Use `NgForOf<T>` instead. - `TrackByFn` is not deprecated. Use `TrackByFunciton<T>` instead. Migration: - Most code is unaffected by this change as references to `NgFor` are generated by the AOT compiler. No template changes required. - Replace references to `NgFor` to `NgForOf<any>`. - Replace references to `TrackByFn` to `TrackByFunction<any>`. Part of angular#12398
chuckjaz
force-pushed
the
ngfor-type-parameter
branch
from
January 25, 2017 22:56
4291efe
to
8bdc458
Compare
chuckjaz
added a commit
to chuckjaz/angular
that referenced
this pull request
Jan 25, 2017
…ngular#14104) DEPRECATION: - `NgFor` is now deprecated. Use `NgForOf<T>` instead. - `TrackByFn` is not deprecated. Use `TrackByFunciton<T>` instead. Migration: - Most code is unaffected by this change as references to `NgFor` are generated by the AOT compiler. No template changes required. - Replace references to `NgFor` to `NgForOf<any>`. - Replace references to `TrackByFn` to `TrackByFunction<any>`. Part of angular#12398
chuckjaz
force-pushed
the
ngfor-type-parameter
branch
from
January 27, 2017 19:17
8bdc458
to
8baaf98
Compare
chuckjaz
added a commit
to chuckjaz/angular
that referenced
this pull request
Jan 27, 2017
chuckjaz
added a commit
to chuckjaz/angular
that referenced
this pull request
Jan 27, 2017
chuckjaz
added a commit
to chuckjaz/angular
that referenced
this pull request
Jan 27, 2017
…ngular#14104) DEPRECATION: - `NgFor` is now deprecated. Use `NgForOf<T>` instead. - `TrackByFn` is not deprecated. Use `TrackByFunciton<T>` instead. Migration: - Most code is unaffected by this change as references to `NgFor` are generated by the AOT compiler. No template changes required. - Replace references to `NgFor` to `NgForOf<any>`. - Replace references to `TrackByFn` to `TrackByFunction<any>`. Part of angular#12398
chuckjaz
force-pushed
the
ngfor-type-parameter
branch
from
January 28, 2017 00:22
8baaf98
to
8f551fa
Compare
chuckjaz
added a commit
to chuckjaz/angular
that referenced
this pull request
Jan 28, 2017
chuckjaz
added a commit
to chuckjaz/angular
that referenced
this pull request
Jan 28, 2017
chuckjaz
added a commit
to chuckjaz/angular
that referenced
this pull request
Jan 28, 2017
…ngular#14104) DEPRECATION: - `NgFor` is now deprecated. Use `NgForOf<T>` instead. - `TrackByFn` is not deprecated. Use `TrackByFunciton<T>` instead. Migration: - Most code is unaffected by this change as references to `NgFor` are generated by the AOT compiler. No template changes required. - Replace references to `NgFor` to `NgForOf<any>`. - Replace references to `TrackByFn` to `TrackByFunction<any>`. Part of angular#12398
chuckjaz
force-pushed
the
ngfor-type-parameter
branch
from
January 28, 2017 00:25
8f551fa
to
f2aacf9
Compare
chuckjaz
added a commit
to chuckjaz/angular
that referenced
this pull request
Jan 28, 2017
…ngular#14104) DEPRECATION: - `NgFor` is now deprecated. Use `NgForOf<T>` instead. - `TrackByFn` is not deprecated. Use `TrackByFunciton<T>` instead. Migration: - Most code is unaffected by this change as references to `NgFor` are generated by the AOT compiler. No template changes required. - Replace references to `NgFor` to `NgForOf<any>`. - Replace references to `TrackByFn` to `TrackByFunction<any>`. BREAKING CHANGE: A definition of `Iterable<T>` is now required to correctly compile Angular applications. Support for `Iterable<T>` is not required at runtime but a type definition must be available. Migration: - adding "es2015.iterable.ts" to your tsconfig.json "libs" fields. Part of angular#12398
chuckjaz
force-pushed
the
ngfor-type-parameter
branch
from
January 28, 2017 01:20
f2aacf9
to
7088d95
Compare
chuckjaz
added a commit
to chuckjaz/angular
that referenced
this pull request
Jan 28, 2017
chuckjaz
added a commit
to chuckjaz/angular
that referenced
this pull request
Jan 28, 2017
…ter (angular#14104) DEPRECATION: - the `NgFor` class is now deprecated. Use `NgForOf<T>` instead. IMPORTANT: Only the `NgFor` class is deprecated, not the `ngFor` directive. The `*ngFor` and related directives are unaffected by this change as references to the `NgFor` class generated from templates will be automatically converted to references to `NgForOf<T>` without requiring any template modifications. - `TrackByFn` is now deprecated. Use `TrackByFunction<T>` instead. Migration: - Replace direct references to the `NgFor` class to `NgForOf<any>`. - Replace references to `TrackByFn` to `TrackByFunction<any>`. BREAKING CHANGE: A definition of `Iterable<T>` is now required to correctly compile Angular applications. Support for `Iterable<T>` is not required at runtime but a type definition `Iterable<T>` must be available. `NgFor`, and now `NgForOf<T>`, already supports `Iterable<T>` at runtime. With this change the type definition is updated to reflect this support. Migration: - add "es2015.iterable.ts" to your tsconfig.json "libs" fields. Part of angular#12398
chuckjaz
changed the title
feat(common): rename
feat(common): rename Jan 28, 2017
NgFor
to NgForOf
and add a type parameterNgFor
class to NgForOf
and add a type parameter
chuckjaz
force-pushed
the
ngfor-type-parameter
branch
from
January 30, 2017 17:06
7088d95
to
3a4b5e1
Compare
chuckjaz
added a commit
to chuckjaz/angular
that referenced
this pull request
Jan 30, 2017
angular#14104) Note, this affects the underlying class and should not affect usage. DEPRECATION: - the `NgFor` class is now deprecated. Use `NgForOf<T>` instead. IMPORTANT: Only the `NgFor` class is deprecated, not the `ngFor` directive. The `*ngFor` and related directives are unaffected by this change as references to the `NgFor` class generated from templates will be automatically converted to references to `NgForOf<T>` without requiring any template modifications. - `TrackByFn` is now deprecated. Use `TrackByFunction<T>` instead. Migration: - Replace direct references to the `NgFor` class to `NgForOf<any>`. - Replace references to `TrackByFn` to `TrackByFunction<any>`. BREAKING CHANGE: A definition of `Iterable<T>` is now required to correctly compile Angular applications. Support for `Iterable<T>` is not required at runtime but a type definition `Iterable<T>` must be available. `NgFor`, and now `NgForOf<T>`, already supports `Iterable<T>` at runtime. With this change the type definition is updated to reflect this support. Migration: - add "es2015.iterable.ts" to your tsconfig.json "libs" fields. Part of angular#12398
chuckjaz
changed the title
feat(common): rename
feat(common): rename underlying Jan 30, 2017
NgFor
class to NgForOf
and add a type parameterNgFor
class and add a type parameter
chuckjaz
force-pushed
the
ngfor-type-parameter
branch
from
January 30, 2017 23:45
3a4b5e1
to
ff9ebcc
Compare
chuckjaz
added a commit
to chuckjaz/angular
that referenced
this pull request
Jan 30, 2017
chuckjaz
added a commit
to chuckjaz/angular
that referenced
this pull request
Jan 30, 2017
angular#14104) Note, this affects the underlying class and should not affect usage. DEPRECATION: - the `NgFor` class is now deprecated. Use `NgForOf<T>` instead. IMPORTANT: Only the `NgFor` class is deprecated, not the `ngFor` directive. The `*ngFor` and related directives are unaffected by this change as references to the `NgFor` class generated from templates will be automatically converted to references to `NgForOf<T>` without requiring any template modifications. - `TrackByFn` is now deprecated. Use `TrackByFunction<T>` instead. Migration: - Replace direct references to the `NgFor` class to `NgForOf<any>`. - Replace references to `TrackByFn` to `TrackByFunction<any>`. BREAKING CHANGE: A definition of `Iterable<T>` is now required to correctly compile Angular applications. Support for `Iterable<T>` is not required at runtime but a type definition `Iterable<T>` must be available. `NgFor`, and now `NgForOf<T>`, already supports `Iterable<T>` at runtime. With this change the type definition is updated to reflect this support. Migration: - add "es2015.iterable.ts" to your tsconfig.json "libs" fields. Part of angular#12398
chuckjaz
force-pushed
the
ngfor-type-parameter
branch
from
January 30, 2017 23:55
ff9ebcc
to
da96ef2
Compare
chuckjaz
added a commit
to chuckjaz/angular
that referenced
this pull request
Jan 30, 2017
angular#14104) Note, this affects the underlying class and should not affect usage. DEPRECATION: - the `NgFor` class is now deprecated. Use `NgForOf<T>` instead. IMPORTANT: Only the `NgFor` class is deprecated, not the `ngFor` directive. The `*ngFor` and related directives are unaffected by this change as references to the `NgFor` class generated from templates will be automatically converted to references to `NgForOf<T>` without requiring any template modifications. - `TrackByFn` is now deprecated. Use `TrackByFunction<T>` instead. Migration: - Replace direct references to the `NgFor` class to `NgForOf<any>`. - Replace references to `TrackByFn` to `TrackByFunction<any>`. BREAKING CHANGE: A definition of `Iterable<T>` is now required to correctly compile Angular applications. Support for `Iterable<T>` is not required at runtime but a type definition `Iterable<T>` must be available. `NgFor`, and now `NgForOf<T>`, already supports `Iterable<T>` at runtime. With this change the type definition is updated to reflect this support. Migration: - add "es2015.iterable.ts" to your tsconfig.json "libs" fields. Part of angular#12398
angular#14104) Note, this affects the underlying class and should not affect usage. DEPRECATION: - the `NgFor` class is now deprecated. Use `NgForOf<T>` instead. IMPORTANT: Only the `NgFor` class is deprecated, not the `ngFor` directive. The `*ngFor` and related directives are unaffected by this change as references to the `NgFor` class generated from templates will be automatically converted to references to `NgForOf<T>` without requiring any template modifications. - `TrackByFn` is now deprecated. Use `TrackByFunction<T>` instead. Migration: - Replace direct references to the `NgFor` class to `NgForOf<any>`. - Replace references to `TrackByFn` to `TrackByFunction<any>`. BREAKING CHANGE: A definition of `Iterable<T>` is now required to correctly compile Angular applications. Support for `Iterable<T>` is not required at runtime but a type definition `Iterable<T>` must be available. `NgFor`, and now `NgForOf<T>`, already supports `Iterable<T>` at runtime. With this change the type definition is updated to reflect this support. Migration: - add "es2015.iterable.ts" to your tsconfig.json "libs" fields. Part of angular#12398
chuckjaz
force-pushed
the
ngfor-type-parameter
branch
from
January 31, 2017 00:21
da96ef2
to
9b2d804
Compare
mhevery
approved these changes
Jan 31, 2017
chuckjaz
removed
the
action: cleanup
The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews
label
Jan 31, 2017
mhevery
pushed a commit
that referenced
this pull request
Feb 1, 2017
mhevery
pushed a commit
that referenced
this pull request
Feb 1, 2017
mhevery
pushed a commit
that referenced
this pull request
Feb 1, 2017
mhevery
pushed a commit
that referenced
this pull request
Feb 1, 2017
mhevery
pushed a commit
that referenced
this pull request
Feb 1, 2017
#14104) Note, this affects the underlying class and should not affect usage. DEPRECATION: - the `NgFor` class is now deprecated. Use `NgForOf<T>` instead. IMPORTANT: Only the `NgFor` class is deprecated, not the `ngFor` directive. The `*ngFor` and related directives are unaffected by this change as references to the `NgFor` class generated from templates will be automatically converted to references to `NgForOf<T>` without requiring any template modifications. - `TrackByFn` is now deprecated. Use `TrackByFunction<T>` instead. Migration: - Replace direct references to the `NgFor` class to `NgForOf<any>`. - Replace references to `TrackByFn` to `TrackByFunction<any>`. BREAKING CHANGE: A definition of `Iterable<T>` is now required to correctly compile Angular applications. Support for `Iterable<T>` is not required at runtime but a type definition `Iterable<T>` must be available. `NgFor`, and now `NgForOf<T>`, already supports `Iterable<T>` at runtime. With this change the type definition is updated to reflect this support. Migration: - add "es2015.iterable.ts" to your tsconfig.json "libs" fields. Part of #12398 PR Close #14104
asnowwolf
pushed a commit
to asnowwolf/angular
that referenced
this pull request
Aug 11, 2017
asnowwolf
pushed a commit
to asnowwolf/angular
that referenced
this pull request
Aug 11, 2017
asnowwolf
pushed a commit
to asnowwolf/angular
that referenced
this pull request
Aug 11, 2017
angular#14104) Note, this affects the underlying class and should not affect usage. DEPRECATION: - the `NgFor` class is now deprecated. Use `NgForOf<T>` instead. IMPORTANT: Only the `NgFor` class is deprecated, not the `ngFor` directive. The `*ngFor` and related directives are unaffected by this change as references to the `NgFor` class generated from templates will be automatically converted to references to `NgForOf<T>` without requiring any template modifications. - `TrackByFn` is now deprecated. Use `TrackByFunction<T>` instead. Migration: - Replace direct references to the `NgFor` class to `NgForOf<any>`. - Replace references to `TrackByFn` to `TrackByFunction<any>`. BREAKING CHANGE: A definition of `Iterable<T>` is now required to correctly compile Angular applications. Support for `Iterable<T>` is not required at runtime but a type definition `Iterable<T>` must be available. `NgFor`, and now `NgForOf<T>`, already supports `Iterable<T>` at runtime. With this change the type definition is updated to reflect this support. Migration: - add "es2015.iterable.ts" to your tsconfig.json "libs" fields. Part of angular#12398 PR Close angular#14104
juleskremer
pushed a commit
to juleskremer/angular
that referenced
this pull request
Aug 28, 2017
juleskremer
pushed a commit
to juleskremer/angular
that referenced
this pull request
Aug 28, 2017
juleskremer
pushed a commit
to juleskremer/angular
that referenced
this pull request
Aug 28, 2017
angular#14104) Note, this affects the underlying class and should not affect usage. DEPRECATION: - the `NgFor` class is now deprecated. Use `NgForOf<T>` instead. IMPORTANT: Only the `NgFor` class is deprecated, not the `ngFor` directive. The `*ngFor` and related directives are unaffected by this change as references to the `NgFor` class generated from templates will be automatically converted to references to `NgForOf<T>` without requiring any template modifications. - `TrackByFn` is now deprecated. Use `TrackByFunction<T>` instead. Migration: - Replace direct references to the `NgFor` class to `NgForOf<any>`. - Replace references to `TrackByFn` to `TrackByFunction<any>`. BREAKING CHANGE: A definition of `Iterable<T>` is now required to correctly compile Angular applications. Support for `Iterable<T>` is not required at runtime but a type definition `Iterable<T>` must be available. `NgFor`, and now `NgForOf<T>`, already supports `Iterable<T>` at runtime. With this change the type definition is updated to reflect this support. Migration: - add "es2015.iterable.ts" to your tsconfig.json "libs" fields. Part of angular#12398 PR Close angular#14104
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
feat(compiler): generate a type parameters for generic type references
feat(tsc-wrapped): record arity of generic classes
Note, this affects the underlying class and should not affect usage.
DEPRECATION:
NgFor
class is now deprecated. UseNgForOf<T>
instead.IMPORTANT: Only the
NgFor
class is deprecated, not thengFor
directive. The
*ngFor
and related directives are unaffected bythis change as references to the
NgFor
class generated fromtemplates will be automatically converted to references to
NgForOf<T>
without requiring any template modifications.TrackByFn
is now deprecated. UseTrackByFunction<T>
instead.Migration:
NgFor
class toNgForOf<any>
.TrackByFn
toTrackByFunction<any>
.BREAKING CHANGE:
A definition of
Iterable<T>
is now required to correctly compileAngular applications. Support for
Iterable<T>
is not required atruntime but a type definition
Iterable<T>
must be available.NgFor
, and nowNgForOf<T>
, already supportsIterable<T>
atruntime. With this change the type definition is updated to reflect
this support.
Migration:
What kind of change does this PR introduce? (check one with "x")
What is the current behavior? (You can also link to an open issue here)
NgFor
usesNgForRow
for its context which has a$implicit
type ofany
. The type of$implicit
should be the element type of the iterator assigned to thengForOf
property.The class name
NgFor
is incorrect as well as it implies it is associated with thengFor
directive instead of thengForOf
directive. Calling itNgFor
seems to imply that if we add syntax to support iterating the fields of an object such asfor...in
,NgFor
would need to host the code instead of creating a new class.The TypeScript code generation does not supply the correct number of type arguments to classes with generic parameters.
What is the new behavior?
A new class is created,
NgForOf<T>
and the old class is deprecated and transformed into a derived classclass NgFor extends NgForOf<any> {}
.The TypeScript emitter was changed to generate the correct number of type parameters for references to generic types.
The TypeScript code generation will generate
NgForOf<any>
for references to this class. However, once #12398 lands, the type parameter would be used to validate references to the context$implicit
Does this PR introduce a breaking change? (check one with "x")
This change requires the project's
tsconfig.json
to include a definition ofIterable<T>
to in the global scope. This can be accomplished by adding "es2015.iterable" into the"libs"
field.