-
Hello, I'm still at the beginning of using pkl, so I still have to find my footing.
In
without importing My understanding is that amending shares all existing properties of the amended template/object, So I expected I am clearly misunderstansing something, is this possible? Or am I looking at it from the wrong perspective? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Two things going on here:
I think you can get what you want by typealiasing each class into the module you're amending, but barring that you do need to import again. |
Beta Was this translation helpful? Give feedback.
Take this module for example:
You can think of this module as either a type or a value. Evaluating this module produces a representation of its value:
As a type, this is similar to a class with properties
a
andb
, and in fact you can use it as a class, like so:As you've seen, the type/value distinction is made evident by the two different kinds of
import
:import "MyModule.pkl"
statement introduces a few things that all share one name:local MyModule = import("MyModule.pkl")