X Tutup
Skip to content

Commit ccb4163

Browse files
committed
feat(facade): add getTypeNameForDebugging function
1 parent cd532b0 commit ccb4163

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

modules/angular2/src/facade/lang.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import 'dart:math' as math;
55
import 'dart:convert' as convert;
66
import 'dart:async' show Future;
77

8+
String getTypeNameForDebugging(Type type) => type.toString();
9+
810
class Math {
911
static final _random = new math.Random();
1012
static int floor(num n) => n.floor();

modules/angular2/src/facade/lang.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ export {_global as global};
55
export var Type = Function;
66
export type Type = new (...args: any[]) => any;
77

8+
export function getTypeNameForDebugging(type: Type): string {
9+
return type['name'];
10+
}
11+
812
export class BaseException extends Error {
913
stack;
1014
constructor(public message?: string, public originalException?, public originalStack?) {

0 commit comments

Comments
 (0)
X Tutup