Ashley
Looking for some guidance on getting the typescript def files to generate corerctly.
I am calling this in Behavior.js
this._info.SetScriptInterfaceNames({
instance: "IAnimatedCounterBehaviorInstance"
});
this._info.SetTypeScriptDefinitionFiles(["c3runtime/IAnimatedCounterBehaviorInstance.d.ts"]);
In the c3runtime folder I have the d.ts file (IAnimatedCounterBehaviorInstance.d.ts)
the signature is
declare class IAnimatedCounterBehaviorInstance<InstType> extends IBehaviorInstance<InstType>
... when creating a new typescript project and updating the typescript def files
I see my d.ts file getting added correctly butwhen i look at the instanceTypes.d.ts
The type of the instance is not set to my interface but my plugin id
declare namespace InstanceType {
class __TextBehaviors<InstType> {
AnimatedCounter: C3.Behaviors.piranha305_animatedcounter.Instance<InstType>;
}
class Text extends ITextInstance {
behaviors: __TextBehaviors<this>;
}
}
If I manually change the type it is working perfect.
class __TextBehaviors<InstType> {
AnimatedCounter: IAnimatedCounterBehaviorInstance<InstType>;
}
is there a way to have construct generate the right type? maybe I missed something in the setup?