8000 feat(compiler): add support for the `typeof` keyword in template expressions by JeanMeche · Pull Request #58183 · angular/angular · GitHub
[go: up one dir, main page]

Skip to content

feat(compiler): add support for the typeof keyword in template expressions #58183

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

Closed
wants to merge 4 commits into from

Conversation

JeanMeche
Copy link
Member
@JeanMeche JeanMeche commented Oct 13, 2024

This commit adds the support for typeof in template expressions like interpolations, bindings, control flow blocks etc.

@pullapprove pullapprove bot requested a review from JoostK October 13, 2024 23:54
@JeanMeche JeanMeche requested review from alxhub and removed request for JoostK October 13, 2024 23:54
@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: compiler Issues related to `ngc`, Angular's template compiler labels Oct 13, 2024
@ngbot ngbot bot modified the milestone: Backlog Oct 13, 2024
@JeanMeche JeanMeche requested a review from JoostK October 13, 2024 23:54
@angular-robot angular-robot bot added area: compiler Issues related to `ngc`, Angular's template compiler and removed area: compiler Issues related to `ngc`, Angular's template compiler labels Oct 14, 2024
@@ -436,18 +452,6 @@ function isIdentifierStart(code: number): boolean {
);
}

export function isIdentifier(input: string): boolean {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function was unused.

@angular-robot angular-robot bot added area: compiler Issues related to `ngc`, Angular's template compiler and removed area: compiler Issues related to `ngc`, Angular's template compiler labels Oct 14, 2024
@angular-robot angular-robot bot added area: compiler Issues related to `ngc`, Angular's template compiler and removed area: compiler Issues related to `ngc`, Angular's template compiler labels Oct 14, 2024
@ngbot ngbot bot modified the milestone: Backlog Oct 14, 2024
@angular-robot angular-robot bot added area: compiler Issues related to `ngc`, Angular's template compiler and removed area: compiler Issues related to `ngc`, Angular's template compiler labels Oct 14, 2024
@@ -99,6 +111,10 @@ export class Token {
return this.type == TokenType.Keyword && this.strValue == 'this';
}

isKeywordTypeof(): boolean {
return this.type == TokenType.Keyword && this.strValue == 'typeof';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should be triple equals.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

none of the method above use ===, should we update them too ?

@angular-robot angular-robot bot added area: compiler Issues related to `ngc`, Angular's template compiler and removed area: compiler Issues related to `ngc`, Angular's template compiler labels Oct 14, 2024
@kuncevic
Copy link
Contributor

This is how random discussions in the Angular team Slack turn into PRs like that 🔥

…essions.

This commit adds the support for `typeof` in template expressions like interpolation, bindings, control flow blocks etc.
@angular-robot angular-robot bot added area: compiler Issues related to `ngc`, Angular's template compiler and removed area: compiler Issues related to `ngc`, Angular's template compiler labels Oct 15, 2024
@angular-robot angular-robot bot added area: compiler Issues related to `ngc`, Angular's template compiler and removed area: compiler Issues related to `ngc`, Angular's template compiler labels Oct 15, 2024
@JeanMeche JeanMeche added the action: merge The PR is ready for merge by the caretaker label Oct 16, 2024
@JeanMeche JeanMeche removed the request for review from alxhub October 16, 2024 01:28
@JeanMeche JeanMeche added the target: major This PR is targeted for the next major release label Oct 16, 2024
@devversion devversion added the action: presubmit The PR is in need of a google3 presubmit label Oct 16, 2024
@devversion
Copy link
Member

This PR was merged into the repository by commit 0c9d721.

The changes were merged into the following branches: main

devversion added a commit to devversion/angular that referenced this pull request Oct 16, 2024
…ate expressions. (angular#58183)"

This reverts commit 0c9d721.
This breaks CI jobs in `main`, and sync into google3. PR was green and
presubmit too; so I'm suspecting some rebase conflicts with other
changes being merged at the same time.
@JeanMeche JeanMeche reopened this Oct 16, 2024
@angular-robot angular-robot bot added area: compiler Issues related to `ngc`, Angular's template compiler and removed area: compiler Issues related to `ngc`, Angular's template compiler labels Oct 16, 2024
@JeanMeche JeanMeche closed this Oct 16, 2024
@JeanMeche JeanMeche deleted the feat/typeof branch October 16, 2024 12:44
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 16, 2024
aceArt-GmbH pushed a commit to aceArt-GmbH/angular that referenced this pull request Jan 3, 2025
…essions. (angular#58183)

This commit adds the support for `typeof` in template expressions like interpolation, bindings, control flow blocks etc.

PR Close angular#58183
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker action: presubmit The PR is in need of a google3 presubmit area: compiler Issues related to `ngc`, Angular's template compiler detected: feature PR contains a feature commit target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
0