Skip to content

Conversation

traviskaufman
Copy link
Contributor

This commit adds Dart gotchas for object destructuring, type aliases,
and tagged template literals, none of which are compilable by dart.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Mar 2, 2016
@@ -43,3 +43,6 @@ Here's a list of gotchas to keep in mind when writing TypeScript code that will
* **Lambdas need to abide to the type required.** Meaning that if a function requires a function that takes one argument, the lambda cannot be `() => {}`. Use `_` for temporary parameters. This is notable in Promises.
* **Dynamic return values fat arrows can't return non-primitive types without casting.** For example, a fat arrow that return a promise (or Future) generates a warning if using directly, like so: `promiseA.then(() => promiseB)`. In this case simply using a block works as expected; `promiseA.then(() => { return promiseB; })`.
* **Dart does not have [generic methods](http://www.typescriptlang.org/Handbook#generics)** ([issue](https://github.com/dart-lang/sdk/issues/254)).
* **Dart does not have destructuring** but it does have a ([proposal](https://github.com/dart-lang/dart_enhancement_proposals/issues/24)) for it.
Copy link
Contributor

Choose a reason for hiding this comment

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

remove parenthesis around proposal.

@hansl
Copy link
Contributor

hansl commented Mar 2, 2016

one nit, LGTM.

@hansl hansl added the pr: lgtm label Mar 2, 2016
This commit adds Dart gotchas for object destructuring, type aliases,
and tagged template literals, none of which are compilable by dart.
@traviskaufman traviskaufman force-pushed the docs-more-ts-dart-gotchas branch from 3073b0e to 3d055fc Compare March 2, 2016 20:07
traviskaufman added a commit that referenced this pull request Mar 2, 2016
@traviskaufman traviskaufman merged commit 4bfcf8a into angular:master Mar 2, 2016
andrewseguin pushed a commit to andrewseguin/components that referenced this pull request Oct 15, 2018
@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 Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants