Closed mhevery closed 8 years ago
Also fails in this case: Given:
interface RegexSerializer { (params: {[key: string]: any}): GeneratedUrl; }
interface RouteDefinition {
serializer?: RegexSerializer;
}
Expected:
typedef GeneratedUrl RegexSerializer(Map<String, dynamic> params);
abstract class RouteDefinition {
final RegexSerializer serializer; // <<<<< Expected change
const RouteDefinition({this.serializer});
}
Actual:
typedef GeneratedUrl RegexSerializer(Map<String, dynamic> params);
abstract class RouteDefinition {
final Function serializer; // <<<< Issue
const RouteDefinition({this.serializer});
}
The first example is tricky in the general case. You're asking to correlate the left hand side property 'name' with the property definition of the same name in the rhs type. I'll have to take a look at the available APIs.
The lost property type with the regexserializer is a separate issue.
Miško Hevery notifications@github.com schrieb am Mo., 4. Apr. 2016, 20:49:
Also fails in this case: Given:
interface RegexSerializer { (params: {[key: string]: any}): GeneratedUrl; } interface RouteDefinition { serializer?: RegexSerializer; }
Expected:
typedef GeneratedUrl RegexSerializer(Map<String, dynamic> params); abstract class RouteDefinition { final RegexSerializer serializer; // <<<<< Expected change const RouteDefinition({this.serializer}); }
Actual:
typedef GeneratedUrl RegexSerializer(Map<String, dynamic> params); abstract class RouteDefinition { final Function serializer; const RouteDefinition({this.serializer}); }
— You are receiving this because you were assigned.
Reply to this email directly or view it on GitHub https://github.com/angular/ts2dart/issues/361#issuecomment-205444546
Any update?
I cannot reproduce the final Function serializer;
issue, see https://reviews.angular.io/D56.
Will take a look at the RouteDefinition
destructuring next.
This should be fixed.
Given:
Expected:
Was: