-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
?. operator for safe member access #1303
Labels
Duplicate
An existing issue was already created
Comments
#16 is tracking the safe navigation / existential operator. It still is in the "needs proposal" phase. |
Cool. I'll close this. |
DanielRosenwasser
added
Duplicate
An existing issue was already created
Suggestion
An idea for TypeScript
labels
Dec 8, 2014
please please please hahahahaha |
+1 for this. really needed. |
Please! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
One of the new features in C# 6 is the new ?. operator which lets you avoid writing lots of boilerplate code when accessing nested properties. It would be nice if there was something similar in TypeScript. http://blogs.msdn.com/b/jerrynixon/archive/2014/02/26/at-last-c-is-getting-sometimes-called-the-safe-navigation-operator.aspx
Problem:
Proposed solution:
This should also work with the results of method calls and array indexing:
The text was updated successfully, but these errors were encountered: