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(compiler): add a pseudo $any() function to disable type checking #20876

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
5 participants
@chuckjaz
Member

chuckjaz commented Dec 7, 2017

$any() can now be used in a binding expression to disable type
checking for the rest of the expression. This similar to as any in
TypeScript and allows expression that work at runtime but do not
type-check.

PR Type

What kind of change does this PR introduce?

[x] Feature

What is the current behavior?

When "fullTemplateTypeCheck" is enabled, error are reported on some expressions that is very hard to adjust to type check correctly.

What is the new behavior?

An expression can be surrounded with a call to the pseudo function $any that will cast the expression to any.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

@googlebot googlebot added the cla: yes label Dec 7, 2017

@mary-poppins

This comment has been minimized.

Show comment
Hide comment
@mary-poppins

mary-poppins commented Dec 7, 2017

@mary-poppins

This comment has been minimized.

Show comment
Hide comment
@mary-poppins

mary-poppins commented Dec 7, 2017

@vicb

vicb approved these changes Dec 8, 2017

LGTM, missing docs

@chuckjaz

This comment has been minimized.

Show comment
Hide comment
@chuckjaz

chuckjaz Dec 8, 2017

Member

Adding docs in a follow-on PR.

Member

chuckjaz commented Dec 8, 2017

Adding docs in a follow-on PR.

@mary-poppins

This comment has been minimized.

Show comment
Hide comment
@mary-poppins

mary-poppins commented Dec 8, 2017

feat(compiler): add a pseudo $any() function to disable type checking
`$any()` can now be used in a binding expression to disable type
checking for the rest of the expression. This similar to `as any` in
TypeScript and allows expression that work at runtime but do not
type-check.
@mary-poppins

This comment has been minimized.

Show comment
Hide comment
@mary-poppins

mary-poppins commented Dec 9, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment