On typekits usage #9729
-
|
Hello! Say we have: // import "./lib.js" // custom decorators here
namespace World;
scalar Id extends string;
model Bag<T extends Model> {
storage: T[],
}
model Foo {
id: Id,
}
// here an application of @deco goesand lib.js is export function $deco(context, model) {
const tk = $(context.program)
tk.entity.resolve("Id") // not found
tk.entity.resolve("World.Id") // found, but how do I guess of the namespace name inside the decorator?
tk.entity.resolve("Bag") // not enough template args, right
tk.entity.resolve("Bag<Foo>") // not found
tk.entity.resolve("World.Bag<World.Foo>") // not found
}What should I do to make "resolve"s work? TIA |
Beta Was this translation helpful? Give feedback.
Answered by
timotheeguerin
Feb 17, 2026
Replies: 1 comment 5 replies
-
|
hhm yeah I don't think we have a way right now to resolve a template instance or declaration. How were you looking to use that? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
we discussed on this issue the idea of exposing a
instantiatetypekit which I feel is exactly what you are looking for #7469 but this isn't something we provide at this moment. If it is I can split that of from this issue into a new one