HaxeFoundation / haxe.org-comments

Repository to collect comments of our haxe.org websites
2 stars 2 forks source link

[haxe.org/manual] Import defaults / import.hx #137

Open utterances-bot opened 11 months ago

utterances-bot commented 11 months ago

Import defaults / import.hx - Haxe - The Cross-platform Toolkit

Haxe is an open source toolkit based on a modern, high level, strictly typed programming language.

https://haxe.org/manual/type-system-import-defaults.html

T1mL3arn commented 11 months ago

A caution about using import.hx and build macro - when you get

You cannot use @:build inside a macro

it can mean a module from import.hx triggers another build macro. To avoid this go to import.hx and wrap the problem import with !macro define:

#if !macro
import some.Module;
#end