Open
Description
Describe the bug
When generating Typescript bindings of a project that includes models imported from dependencies, the SchemaType
includes the original model namespace, instead of adding them to the default namespace, where they are actually created.
To Reproduce
Import and configure Arcade achievements:
achievement = { git = "https://github.com/cartridge-gg/arcade", tag = "v1.5.0" }
Generate typescript bindings, the imported models are in the original namespace inside SchemaType
:
export interface SchemaType extends ISchemaType {
pistols: {
Challenge: Challenge,
ChallengeMessage: ChallengeMessage,
ChallengeMessageValue: ChallengeMessageValue,
ChallengeValue: ChallengeValue,
// ...
MockedValue: MockedValue,
MockedValueValue: MockedValueValue,
},
// this will not work, as `achievement` is not a namespace in the game
// this will also break `SchemaType`
achievement: {
TrophyCreation: TrophyCreation,
TrophyCreationValue: TrophyCreationValue,
TrophyProgression: TrophyProgression,
TrophyProgressionValue: TrophyProgressionValue,
},
}
Expected behavior
Imported models should be on the default namespace.