X Tutup
Skip to content

Commit 331b9c1

Browse files
committed
fix(transformers): special case types some built-in types, so they can be resolved
1 parent 4a93f58 commit 331b9c1

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

modules_dart/transform/lib/src/transform/template_compiler/compile_data_creator.dart

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,14 +215,24 @@ class _CompileDataCreator {
215215
} else if (_isPrimitive(id.name)) {
216216
return id;
217217

218+
// TODO: move the following if statements into transformer configuration
218219
} else if (id.name == "Window") {
219220
return new CompileIdentifierMetadata(name: "Window", moduleUrl: 'dart:html');
220221

221222
} else if (id.name == "Clock") {
222-
return new CompileIdentifierMetadata(name: "Clock", moduleUrl: 'dart:time');
223+
return new CompileIdentifierMetadata(name: "Clock", moduleUrl: 'asset:quiver/time/clock.dart');
223224

224225
} else if (id.name == "Profiler") {
225-
return new CompileIdentifierMetadata(name: "Clock", moduleUrl: 'profiler');
226+
return new CompileIdentifierMetadata(name: "Profiler", moduleUrl: 'asset:perf_api/perf_api.dart');
227+
228+
} else if (id.name == "Campaign") {
229+
return new CompileIdentifierMetadata(name: "Campaign", moduleUrl: 'unspecified');
230+
231+
} else if (id.name == "PreloadData") {
232+
return new CompileIdentifierMetadata(name: "PreloadData", moduleUrl: 'unspecified');
233+
234+
} else if (id.name == "FiberMarket") {
235+
return new CompileIdentifierMetadata(name: "FiberMarket", moduleUrl: 'unspecified');
226236

227237
} else {
228238
log.error(

0 commit comments

Comments
 (0)
X Tutup