fix(transformers): special case types some built-in types, so they can be resolved

This commit is contained in:
vsavkin 2016-02-29 10:34:34 -08:00
parent 4a93f58b8b
commit 331b9c1317
1 changed files with 12 additions and 2 deletions

View File

@ -215,14 +215,24 @@ class _CompileDataCreator {
} else if (_isPrimitive(id.name)) {
return id;
// TODO: move the following if statements into transformer configuration
} else if (id.name == "Window") {
return new CompileIdentifierMetadata(name: "Window", moduleUrl: 'dart:html');
} else if (id.name == "Clock") {
return new CompileIdentifierMetadata(name: "Clock", moduleUrl: 'dart:time');
return new CompileIdentifierMetadata(name: "Clock", moduleUrl: 'asset:quiver/time/clock.dart');
} else if (id.name == "Profiler") {
return new CompileIdentifierMetadata(name: "Clock", moduleUrl: 'profiler');
return new CompileIdentifierMetadata(name: "Profiler", moduleUrl: 'asset:perf_api/perf_api.dart');
} else if (id.name == "Campaign") {
return new CompileIdentifierMetadata(name: "Campaign", moduleUrl: 'unspecified');
} else if (id.name == "PreloadData") {
return new CompileIdentifierMetadata(name: "PreloadData", moduleUrl: 'unspecified');
} else if (id.name == "FiberMarket") {
return new CompileIdentifierMetadata(name: "FiberMarket", moduleUrl: 'unspecified');
} else {
log.error(